Skip to content
themeforge
EN
Start free
Menu
  1. Home
  2. Attribute reference
  3. fld-text
Core Text and images

Make a heading, caption or price editable

fld-text="Field name"

The most common attribute: a one-line text field in the admin. The client changes the words, the design stays as it is.

Where it goes

On the element that holds the text: a heading, a paragraph, a <span> with a price, a link’s caption. The value of the attribute is the field’s label in the admin, so write it the way the client will understand it.

The text that is in the HTML now becomes the field’s first value when you press “Load data” in the admin.

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

Example: the hero of the home page

Markup index.html
<section class="hero">
  <p class="eyebrow" fld-text="Eyebrow">Open every day</p>
  <h1 fld-text="Hero title">Coffee for slow mornings</h1>
  <span class="price" fld-text="Latte price">$4.20</span>
</section>
In the admin Pages → Home
Eyebrow Open every day
Hero title Coffee for slow mornings
Latte price $4.50
On the site after an edit

Open every day

Coffee for slow mornings
Latte $4.50

The client changed the price to $4.50; the markup did not change.

What matters

  • The field replaces everything inside the element, tags included. If part of the heading has its own style, give that part its own field.
  • One field per name in a group: two elements with fld-text="Price" show the same value.
  • An empty field prints nothing: the text from the HTML is only the starting value, not a fallback.
  • For several lines use fld-area, for formatted text fld-editor.

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
<h1 fld-text="Hero title">Coffee for
  <span class="accent">slow mornings</span></h1>

The field takes the whole heading, so the accent <span> and its style disappear. The log is silent.

Like this
<h1><span fld-text="Hero title">Coffee for</span>
  <span class="accent" fld-text="Hero accent">slow mornings</span></h1>

Each styled part has its own field.

Not like this
<h1 fld-text="">Coffee for slow mornings</h1>

No name: the build log reports the attribute and the text stays fixed.

Like this
<h1 fld-text="Hero title">Coffee for slow mornings</h1>

Every field has a name.

The same in site settings or on a category
fld-texton a page or post, as above
opt-textin site settings: one value for every page, such as a phone in the header
tax-texton a category or tag: each term has its own value
Alternative spelling

f_text, o_text, 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.