Docs Vector Expressions ProFeaturesExpanded Data Roots PRO

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:

PropertyTypeDescription
view.typeStringThe view type — singular, taxonomy, author, search, date, 404, etc.
view.titleStringThe page title (post title, archive title, search heading, etc.)
view.descriptionStringThe page description (excerpt, term description, or empty)
view.contentStringThe page content (post content on singular views, empty on archives)
view.urlStringThe canonical URL for the current view
view.idIntegerThe post/term/author ID (context-dependent)
view.object_typeStringThe object type — post, page, category, post_tag, custom taxonomy, etc.
view.dateStringPublish or archive date
view.modifiedStringLast modified date (singular views only)
view.author_nameStringAuthor 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

PropertyTypeDescription
query.is_homeBooleanTrue on the blog posts index
query.is_front_pageBooleanTrue on the static front page
query.is_singleBooleanTrue on a single post
query.is_pageBooleanTrue on a static page
query.is_singularBooleanTrue on any singular content
query.is_archiveBooleanTrue on any archive page
query.is_categoryBooleanTrue on a category archive
query.is_tagBooleanTrue on a tag archive
query.is_taxBooleanTrue on a custom taxonomy archive
query.is_authorBooleanTrue on an author archive
query.is_dateBooleanTrue on a date-based archive
query.is_searchBooleanTrue on the search results page
query.is_404BooleanTrue on the 404 page
query.is_pagedBooleanTrue when viewing paginated results (> p1)
PropertyTypeDescription
query.search_termsStringThe current search query string
query.current_pageIntegerThe current page number
query.max_pagesIntegerTotal number of pages
query.found_postsIntegerTotal matching posts across all pages
query.posts_per_pageIntegerNumber of posts per page

Queried Object

query.queried_object is a nested object whose shape varies by context:

ContextAvailable Properties
Taxonomy archiveid, name, slug, description, count, taxonomy
Post type archivename, label, description
Author archiveid, 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.

PropertyTypeDescription
date.yearIntegerCurrent year (e.g., 2026)
date.monthIntegerCurrent month number (1–12)
date.month_nameStringCurrent month name (e.g., March)
date.dayIntegerCurrent day of the month (1–31)
date.day_nameStringCurrent day name (e.g., Tuesday)
date.hourIntegerCurrent hour (0–23)
date.minuteIntegerCurrent minute (0–59) ¹
date.timestampIntegerCurrent Unix timestamp ¹
date.nowStringCurrent 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)

PropertyTypeDescription
post.modifiedStringLast modified date (YYYY-MM-DD HH:MM:SS)
post.parentIntegerParent post ID (0 if no parent)
post.menu_orderIntegerMenu order value
post.comment_countIntegerTotal approved comment count
post.comment_statusStringComment status (open or closed)

user (Pro additions)

PropertyTypeDescription
user.first_nameStringThe user’s first name
user.last_nameStringThe user’s last name
user.nicknameStringThe user’s nickname
user.bioStringThe user’s biographical description

site (Pro additions)

PropertyTypeDescription
site.admin_emailStringSite admin email address
site.timezoneStringSite timezone (e.g., America/New_York)
site.date_formatStringPHP date format string (e.g., F j, Y)
site.time_formatStringPHP time format string (e.g., g:i a)
site.posts_per_pageIntegerDefault posts per page setting
site.charsetStringSite character set (e.g., UTF-8) ¹
site.versionStringWordPress version ¹
site.is_multisiteBooleanTrue 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.