Skip to content
themeforge
EN
Start free
Menu
  1. Home
  2. Attribute reference
  3. tax-loop
Core Categories

A list of rows of its own on every category

tax-loop="Field name"

“Coffee” has three short facts, “Kitchen” has five. tax-loop makes such a list a category field: the client adds and removes rows on the category itself, and the look of a row stays yours.

Where it goes

On the block with the rows in archive.html: tax-loop="Category highlights". The first row is the sample; the fields inside it are ordinary fld-text, fld-image and the rest, and they become the row’s fields.

It works like fld-loop, only the list lives on the category.

The field appears in the admin only if the page has a group name: wp-fields-group on its <body>.

Example: short facts about a category

Markup archive.html
<header class="category">
  <h1 wp="term-title">Coffee</h1>
  <ul class="category__facts" tax-loop="Category highlights">
    <li fld-text="Highlight">Roasted on Mondays</li>
    <li fld-text="Highlight">Beans from three farms</li>
  </ul>
</header>
In the admin Posts → Categories → Coffee
Name Coffee
Category highlights
1
Highlight Roasted on Mondays
2
Highlight Beans from three farms
3
Highlight Decaf on request
Add Row
On the site category page
Coffee

Roasted on Mondays

Beans from three farms

Decaf on request

The client added the third row on the category; the markup did not have it.

What matters

  • The list appears on every category and tag, each with its own rows.
  • The rows in your markup are only a sample: “Load data” does not fill category lists.
  • If a category has no rows, the list block is left off its page.

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
<ul tax-loop="Category highlights">
  <li class="deco"></li>
  <li fld-text="Highlight">Roasted on Mondays</li>
</ul>

An element without fields stands before the rows: the next one becomes the sample, and this element never reaches the site. The build notes this in the log.

Like this
<ul tax-loop="Category highlights">
  <li fld-text="Highlight">Roasted on Mondays</li>
</ul>

The decoration goes outside the list.

Not like this
<ul fld-loop="Category highlights">
  <li fld-text="Highlight">Roasted on Mondays</li>
</ul>

fld-loop on a category page is a list of a page or post, not of the category: the category gets no rows of its own. The log stays silent.

Like this
<ul tax-loop="Category highlights">
  <li fld-text="Highlight">Roasted on Mondays</li>
</ul>

tax-loop is the category’s own list.

Alternative spelling

t_loop works the same: the build gives an identical theme.

Ready when you are

See your site’s WordPress admin before you pay.