Several fields together under one heading
fld-group="Group name" Opening hours, a contact block, a promo banner: fields that belong together appear in one framed box, but the client cannot add more of them.
Where it goes
On the block that holds the fields. Inside, mark the fields as usual: they become parts of the group.
If the client should add more of the same, it is a list: use fld-loop.
The field appears in the admin only if the page has a group name: wp-fields-group on its <body>.
Example: opening hours
<section class="hours" fld-group="Opening hours">
<p fld-text="Weekdays">Mon–Fri 7:30–19:00</p>
<p fld-text="Weekend">Sat–Sun 9:00–17:00</p>
</section>The client changed the weekend hours.
What matters
- A group has no value of its own: it only frames its fields in the admin.
- A row of a list is already a group. Do not put
fld-groupon the cards offld-loop.
Common mistakes
The build log is the “Logs” tab of your project on themeforge.pro; the free markup check shows the same notes.
<div fld-loop="Drinks">
<article fld-group="Drink">
<h3 fld-text="Name">Latte</h3>
</article>
</div>A group on the card of a list: every row gets an empty sub-group, and the site showed empty cards in our demo build.
<div fld-loop="Drinks">
<article>
<h3 fld-text="Name">Latte</h3>
</article>
</div>The card of the list carries only its fields.
The same in site settings or on a category
fld-group | on a page or post |
|---|---|
opt-group | in site settings, such as the contacts in the footer |
tax-group | on a category or tag |
Alternative spelling
f_group, o_group, t_group works the same: the build gives an identical theme.