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

A text field of your own on every category

tax-text="Field name"

Besides the name and description, a category sometimes needs something more: a subtitle, a “new” badge, a line about the supplier. tax-text adds such a field to categories, and the category page shows the value of the one being viewed.

Where it goes

On archive.html, the category page template, on the element with the text: tax-text="Category tagline".

A paragraph with line breaks is tax-area, formatted text is tax-editor: they work like fld-area and fld-editor, only the field 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: a category subtitle

Markup archive.html
<header class="category">
  <h1 wp="term-title">Coffee</h1>
  <p class="category__tagline" tax-text="Category tagline">Roasted on Mondays</p>
</header>
In the admin Posts → Categories → Coffee
Name Coffee
Category tagline Roasted on Mondays, sold out by Friday
On the site category page
Coffee

Roasted on Mondays, sold out by Friday

“Coffee” has one line, “Kitchen” another, and the design is the same.

What matters

  • The field appears on every category, tag and product category: each can have its own value or stay empty.
  • The text in your markup is only a sample. “Load data” does not fill category fields: the value is entered on each category.
  • The category’s name and description already exist in WordPress and need no field: see wp="term-title".

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
<p class="category__tagline" fld-text="Category tagline">Roasted on Mondays</p>

fld-text on a category page reads a field of a page or post, not of the category: the category gets no value of its own. The log stays silent.

Like this
<p class="category__tagline" tax-text="Category tagline">Roasted on Mondays</p>

tax-text is the category’s own field.

Alternative spelling

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

Used in recipes

Ready when you are

See your site’s WordPress admin before you pay.