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

A link or a button the client can change

fld-link="Field name"

The address of a link becomes a field in the admin. The caption is a separate text field next to it, so the client can change either.

Where it goes

On the <a>: the build changes only its href. Mark the caption inside with fld-text under another name.

Naming that never collides: the link “Hero button”, the caption “Hero button text”.

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

Example: the button in the hero

Markup index.html
<a class="button" href="/menu" fld-link="Hero button">
  <span fld-text="Hero button text">See the menu</span>
</a>
In the admin Pages → Home
Hero button /menu
Hero button text See the menu
On the site the home page
Coffee for slow mornings See the menu

What matters

  • The field holds the address as text: /menu, https://…, tel:+1….
  • A link with href="#" starts empty: there is nothing to carry over.
  • Link and caption need different names, otherwise they become one field.

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
<a href="/menu" fld-link="Button">
  <span fld-text="Button">See the menu</span>
</a>

Link and caption under one name: the build log reports a collision, and one field feeds both the address and the text.

Like this
<a href="/menu" fld-link="Button">
  <span fld-text="Button text">See the menu</span>
</a>

The caption is “Button text”.

Not like this
<div class="button" fld-link="Hero button">See the menu</div>

Not a link: the address lands on a <div> and nothing is clickable. The build log flags the wrong element.

Like this
<a class="button" href="/menu" fld-link="Hero button">See the menu</a>

On an <a>.

The same in site settings
fld-linkon a page or post
opt-linkin site settings, such as a booking link in the header
Alternative spelling

f_link, o_link 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.