A button that leads somewhere different on each category
tax-link="Field name" On the “Coffee” category page the button leads to the coffee section of the menu, on “Kitchen” to the dishes. The address is a category field, and the client changes it in the category’s settings.
Where it goes
On an <a> in archive.html: the build replaces its href.
Mark the caption inside with tax-text under another name: “Category button” and “Category button text”.
The field appears in the admin only if the page has a group name: wp-fields-group on its <body>.
Example: a button in the category header
<header class="category">
<h1 wp="term-title">Coffee</h1>
<a class="button" href="/menu" tax-link="Category button">
<span tax-text="Category button text">See it on the menu</span>
</a>
</header>What matters
- The field keeps the address as text:
/menu#coffee,https://…. - An empty field gives an empty
href: fill it in on every category that has the button. - The link and its caption have different names, otherwise they are 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.
<a href="/menu" tax-link="Button">
<span tax-text="Button">See it on the menu</span>
</a>The link and its caption share a name: the build log reports a collision, and one field feeds both the address and the text.
<a href="/menu" tax-link="Button">
<span tax-text="Button text">See it on the menu</span>
</a>The caption is called “Button text”.
<div class="button" tax-link="Category button">See it on the menu</div>Not a link: the address lands on a <div>, and there is nothing to click. The build log says the attribute is on the wrong element.
<a class="button" href="/menu" tax-link="Category button">See it on the menu</a>On an <a>.
Alternative spelling
t_link works the same: the build gives an identical theme.