Skip to content
themeforge
EN
Start free
Menu
  1. Home
  2. Attribute reference
  3. fld-group
Core Lists

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

Markup contacts.html
<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>
In the admin Pages → Contacts
Opening hours
Weekdays Mon–Fri 7:30–19:00
Weekend Sat–Sun 9:00–18:00
On the site after an edit
Opening hours
Mon–Fri 7:30–19:00
Sat–Sun 9:00–18:00

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-group on the cards of fld-loop.

Common mistakes

The build log is the “Logs” tab of your project on themeforge.pro; the free markup check shows the same notes.

Not like this
<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.

Like this
<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-groupon a page or post
opt-groupin site settings, such as the contacts in the footer
tax-groupon a category or tag
Alternative spelling

f_group, o_group, t_group works the same: the build gives an identical theme.

Ready when you are

See your site’s WordPress admin before you pay.