Dynamic Data
Dynamic data lets you display live WordPress content — post titles, user names, dates, custom fields — directly in your templates. You write expressions like {{ post.title }}, and visitors see the actual content.
How expressions work
Expressions are wrapped in double curly braces {{ }}. Inside, you access data through providers, transform it with filters using the pipe | operator, and call functions directly.
{{ post.title }} {# Access data #}
{{ post.title|upper }} {# Transform with a filter #}
{{ post.date('F j, Y') }} {# Call a method with arguments #}
{{ post.subtitle ?? post.title }} {# Fallback if null #}
{{ get_post(42).title }} {# Call a function #}
Providers
Providers are the variables you use to access data. Which ones are available depends on the page context.
Root providers
These are directly available in your expressions:
| Provider | Available on | Description |
|---|---|---|
| post | Single posts/pages, loops | Current post or loop item |
| user | All pages | Current logged-in visitor |
| author | Posts, author archives | Post author — same fields as user, different person |
| site | All pages | Global site settings and URLs |
| term | Term archives, term loops | Current taxonomy term |
| archive | Archives, search | Archive title and type |
| request | All pages | URL parameters and referrer |
Chained providers
These are not root variables — you reach them by chaining from another provider:
| Provider | Accessed via | Description |
|---|---|---|
| Image | post.thumbnail, site.icon | Image URL, dimensions, alt text |
| Attachment | Loop over attachments | File info for non-image attachments |
{{ post.thumbnail.src('large') }} {# Image provider via post #}
{{ site.icon.src }} {# Image provider via site #}
{{ post.author.name }} {# User provider via post #}
Context detection
Unblock automatically provides the right data based on the page type:
| Page type | Available providers |
|---|---|
| Single post/page | post, author, user, site, request |
| Term archive | term, archive, user, site, request |
| Author archive | author, archive, user, site, request |
| Search results | archive, user, site, request |
Inside a Loop block, the loop variable (e.g. post, term) resolves to the current item, not the page-level context.
Quick examples
{# Post data #}
{{ post.title }}
{{ post.excerpt }}
{{ post.thumbnail.src('large') }}
{{ post.author.name }}
{{ post.date('F j, Y') }}
{{ post.meta('price') }}
{# User data #}
{{ user.logged_in ? 'Welcome!' : 'Please log in' }}
{# Fallbacks #}
{{ post.subtitle ?? post.title }}
{{ post.meta('image') ?? '/default.jpg' }}
Lazy evaluation
Expressions are evaluated on-demand. When you write {{ post.subtitle ?? post.title }}, the title is only fetched if the subtitle is null. Branches that are never reached don't trigger any queries.
Next steps
- Your First Expression — learn the basics step by step
- Expressions & Syntax — operators, literals, and advanced features
- Providers — all available data fields
- Filters — transform and format data
- Functions — built-in functions