Expanded Data Roots
Pro adds three new context roots — view, query, and date — and extends the existing free roots with additional properties. For the base user, post, and site documentation, see Data Roots.
view
The page-level context that persists regardless of inner Query Loops. Unlike post (which shifts to the current loop iteration), view always refers to the top-level page being viewed.
It adapts to every WordPress view type — singular, category/tag/taxonomy archive, author archive, search results, date archive, post type archive, blog/home, 404, and front page. Every view type returns the same unified shape:
| Property | Type | Description |
|---|---|---|
view.type | String | The view type — singular, taxonomy, author, search, date, 404, etc. |
view.title | String | The page title (post title, archive title, search heading, etc.) |
view.description | String | The page description (excerpt, term description, or empty) |
view.content | String | The page content (post content on singular views, empty on archives) |
view.url | String | The canonical URL for the current view |
view.id | Integer | The post/term/author ID (context-dependent) |
view.object_type | String | The object type — post, page, category, post_tag, custom taxonomy, etc. |
view.date | String | Publish or archive date |
view.modified | String | Last modified date (singular views only) |
view.author_name | String | Author display name (singular and author archive views) |
Key use case: Show page-level data inside a Query Loop where post.* would give you the loop item instead.
Example:
{{-- Always shows the page title, even inside a Query Loop --}}
{{ view.title }}
{{-- Conditional based on view type --}}
{{ view.type == "search" ? "Search results for: {view.title}" : view.title }}
query
Exposes the current WP_Query state. Properties are split into two groups:
Conditionals
| Property | Type | Description |
|---|---|---|
query.is_home | Boolean | True on the blog posts index |
query.is_front_page | Boolean | True on the static front page |
query.is_single | Boolean | True on a single post |
query.is_page | Boolean | True on a static page |
query.is_singular | Boolean | True on any singular content |
query.is_archive | Boolean | True on any archive page |
query.is_category | Boolean | True on a category archive |
query.is_tag | Boolean | True on a tag archive |
query.is_tax | Boolean | True on a custom taxonomy archive |
query.is_author | Boolean | True on an author archive |
query.is_date | Boolean | True on a date-based archive |
query.is_search | Boolean | True on the search results page |
query.is_404 | Boolean | True on the 404 page |
query.is_paged | Boolean | True when viewing paginated results (> p1) |
Pagination & Search
| Property | Type | Description |
|---|---|---|
query.search_terms | String | The current search query string |
query.current_page | Integer | The current page number |
query.max_pages | Integer | Total number of pages |
query.found_posts | Integer | Total matching posts across all pages |
query.posts_per_page | Integer | Number of posts per page |
Queried Object
query.queried_object is a nested object whose shape varies by context:
| Context | Available Properties |
|---|---|
| Taxonomy archive | id, name, slug, description, count, taxonomy |
| Post type archive | name, label, description |
| Author archive | id, name, slug |
Example:
{{-- "Showing 42 results" --}}
{{ query.is_search ? "Showing {query.found_posts} results" : "" }}
{{-- "Page 2 of 5" --}}
{{ query.is_paged ? "Page {query.current_page} of {query.max_pages}" : "" }}
{{-- Category description on archive pages --}}
{{ query.is_category ? query.queried_object.description : "" }}
date
Current date/time values for time-based expressions — a convenience alternative to the "now" | date pattern.
| Property | Type | Description |
|---|---|---|
date.year | Integer | Current year (e.g., 2026) |
date.month | Integer | Current month number (1–12) |
date.month_name | String | Current month name (e.g., March) |
date.day | Integer | Current day of the month (1–31) |
date.day_name | String | Current day name (e.g., Tuesday) |
date.hour | Integer | Current hour (0–23) |
date.minute | Integer | Current minute (0–59) ¹ |
date.timestamp | Integer | Current Unix timestamp ¹ |
date.now | String | Current date formatted using the site’s setting |
NOTE
¹ minute and timestamp work at runtime but are not included in the editor property definitions — they won’t appear in autocomplete suggestions.
Example:
{{-- Copyright footer --}}
© {{ date.year }} All rights reserved.
{{-- Time-based greeting --}}
{{ date.hour < 12 ? "Good morning" : date.hour < 18 ? "Good afternoon" : "Good evening" }}
{{-- Seasonal visibility (show only in December) --}}
{{ date.month == 12 ? "🎄 Holiday Sale!" : "" }}
Extended Properties
Pro extends the existing free roots with additional properties. These are not new roots — they add to the post, user, and site roots documented in the free Data Roots reference.
post (Pro additions)
| Property | Type | Description |
|---|---|---|
post.modified | String | Last modified date (YYYY-MM-DD HH:MM:SS) |
post.parent | Integer | Parent post ID (0 if no parent) |
post.menu_order | Integer | Menu order value |
post.comment_count | Integer | Total approved comment count |
post.comment_status | String | Comment status (open or closed) |
user (Pro additions)
| Property | Type | Description |
|---|---|---|
user.first_name | String | The user’s first name |
user.last_name | String | The user’s last name |
user.nickname | String | The user’s nickname |
user.bio | String | The user’s biographical description |
site (Pro additions)
| Property | Type | Description |
|---|---|---|
site.admin_email | String | Site admin email address |
site.timezone | String | Site timezone (e.g., America/New_York) |
site.date_format | String | PHP date format string (e.g., F j, Y) |
site.time_format | String | PHP time format string (e.g., g:i a) |
site.posts_per_page | Integer | Default posts per page setting |
site.charset | String | Site character set (e.g., UTF-8) ¹ |
site.version | String | WordPress version ¹ |
site.is_multisite | Boolean | True if the site is a multisite installation ¹ |
NOTE
¹ charset, version, and is_multisite work at runtime but are not included in the editor property definitions — they won’t appear in autocomplete suggestions.