Dynamic Content
Dynamic content links a field to live data instead of a value you type. A heading can show the post's title, an image can show the featured image, and a button can link to the page you choose, so one template or pattern stays correct on every page it appears on. The value updates by itself whenever the data changes.
How To Link A Field
Starting screenthe block editor or the Site Editor, with a block selected.
You can link a field from two places:
- The block toolbar. Choose the Dynamic content button beside Canvas AI, then Insert dynamic tag. It links the block's main field: the text of a heading, paragraph or button, or the picture of an image.
- The block settings sidebar. Choose the Dynamic button under a field. It appears under fields that can hold live data: text, links, images and numbers such as a count or a price. It never appears under sizes, spacing, colours or CSS classes.
Pick a tag from the list. Type in the search box to find one quickly. Only tags that fit the field are offered: a link field lists links, an image field lists images. Then set the tag's options, such as a date format or the taxonomy to list, and the field is linked as you go; there is no Apply button.
A linked field shows the tag's name in place of the input, with Edit and Remove. In the toolbar the Dynamic content button shows the tag's name, and its menu offers Edit tag and Unlink. Removing the tag brings back whatever you had typed in the field.
How To Add Words Around The Value
Every text tag has three extra boxes:
- Before and After add words around the value, for example
Posted onbefore Post Date, ormin readafter Reading Time. - Fallback is shown when the tag has nothing to show, such as a post with no excerpt.
Leave Fallback empty and the field shows the value you typed in it instead. That makes the typed value a sensible default: type a placeholder, link the field, and the placeholder appears wherever the data is missing. Image tags work the same way: when there is no picture, the block keeps its own image.
What You Can Link
| Group | Tags |
|---|---|
| Post | Post Title, Post Excerpt, Post Date, Post Modified Date, Post Time, Post Terms, Post ID, Post URL, Featured Image, Comments Count, Reading Time, Custom Field |
| Archive | Archive Title, Archive Description, Archive URL, Archive Post Count |
| Site | Site Title, Site Tagline, Site URL, Site Logo, Current Date, Theme Option, Business Contact |
| Author | Author Name, Author Bio, Author Avatar, Author Posts URL, Author Website |
| Links | Home Page, Page, Archive, Privacy Policy, Support, Documentation, Upgrade |
| WooCommerce | Product Title, Product Price, Regular Price, Sale Price, SKU, Stock Status, Average Rating, Review Count, Short Description, Product Image, Add to Cart URL, Product Category Image |
| Content Types | Event Start Date, Event End Date, Event Time, Event Location, Event Price, Event Ticket URL, Project Client, Project Year, Project URL, Content Type Field |
| Visitor | User Display Name, User First Name, User Last Name, User Email, User Avatar, URL Parameter, Cart Item Count, Cart Total |
The WooCommerce group appears only while WooCommerce is active. Custom Field lists the named custom fields registered on your site that hold content, and Content Type Field lists the fields of a demo's own content type. Fields that hold settings, such as classes or sizes, are left out of both.
Visitor Tags And Page Caching
Starting screenthe tag list, Visitor group.
The Visitor tags and Current Date are marked Not cache-safe: they show a different value to each visitor or on each day. A Current Date that shows only the year is the exception and is safe. Most hosts and caching plugins save a copy of each page and serve that copy to everyone, which would show one visitor's name to the next. When a page shows one of these tags, Canvas asks caching plugins that follow the common convention (WP Super Cache, W3 Total Cache, WP Rocket, LiteSpeed Cache and others) not to cache that page. A cache run by your host or a CDN may ignore that request, so check with your host before you use Visitor tags on a page that must stay fast.
The User tags show their Fallback to visitors who are not logged in, so set one, for example there after Welcome back, . URL Parameter and the cart tags work for every visitor.
Dynamic Content In Templates And Loops
Tags read the post the block belongs to. On a single post that is the post itself; inside a Query Loop each card reads its own post, so a linked heading in the loop shows every post's own title. In the Site Editor, a template previews with a recent post so you can see real values while you design.
Core Blocks
WordPress's own Heading, Paragraph, Button and Image blocks take the same tags. Use the Dynamic content toolbar button, or the Attributes panel WordPress shows in the block sidebar. In the editor a linked core block shows the tag's name in braces, for example {Post Title}, and the real value appears on the page.
Pitfalls
- The Dynamic button is missing under a field. The field holds a setting, not content: sizes, spacing, colours, classes and choices never take tags.
- A linked field shows the typed text on the page. The tag found nothing for this post and no Fallback is set. Add a Fallback, or check the data, such as a missing excerpt or an empty custom field.
- Every tag shows its Fallback. Dynamic content needs an active Canvas licence. Without one, linked fields show their Fallback, or the typed value when there is none. The Theme Option tag is the exception and works on every site.
- A visitor's name appears for someone else. A cache that ignores the do-not-cache request served a saved copy. Exclude the page in your host's or CDN's cache settings.
