Modifier Reference
Modifiers transform the output of an expression. They are applied using the pipe operator | and can be chained left to right.
{{ value | modifier_one | modifier_two arg="foo" }}
Note: Modifiers are the outermost operation in a pipeline. You cannot use dot notation to access properties on a modifier’s output (e.g.,
| get_post.titleis invalid). Wrap in parentheses instead:(post.meta.id | get_post).title.
Positional vs. Named Arguments
Most modifiers accept both positional and named argument styles:
| Style | Example |
|---|---|
| Positional | | date "Y-m-d" |
| Named | | date format="Y-m-d" |
Modifiers supporting both styles and their argument names:
| Modifier | Positional index 0 | Named key |
|---|---|---|
date | format string | format |
default | fallback value | — |
if | then value | then, else |
map | key string | key |
join | separator string | glue |
String Modifiers
upper
Converts a string to UPPERCASE.
{{ user.name | upper }}
→ "JANE DOE"
lower
Converts a string to lowercase.
{{ post.title | lower }}
→ "my post title"
esc_html
Explicitly escapes HTML entities in the output string.
{{ post.meta.user_input | esc_html }}
esc_attr
Escapes a value for safe use inside HTML attributes such as title, alt, or value.
{{ post.excerpt | esc_attr }}
raw
Marks a string as safe HTML, bypassing the default htmlspecialchars escaping path. Output is still filtered through wp_kses_post to strip dangerous tags like <script>.
{{ post.meta.html_content | raw }}
Use
rawinstead of triple-brace{{{ }}}syntax inside Gutenberg RichText — the triple-brace syntax is not supported there.
render
Recursively parses any {{ }} expressions found within the input string. Useful when expression strings are stored in post meta.
{{ post.meta.dynamic_template | render }}
Date Modifiers
date
Formats a date value using a PHP date format string. If no format is provided, the WordPress date_format site option is used as the default.
{{ post.date | date "F j, Y" }}
→ "February 24, 2026"
{{ "now" | date "Y-m-d" }}
→ "2026-02-24"
Logic Modifiers
default
Returns the provided fallback if the value is empty, null, or false.
{{ post.meta.subtitle | default "No subtitle provided" }}
if
The piped input value is treated as the condition. If truthy, returns the then argument; otherwise returns the else argument (or null if omitted).
{{/* Show label if badge_label is truthy */}}
{{ post.meta.badge_label | if then=post.meta.badge_label }}
{{/* Show label only if the user is logged in */}}
{{ user.is_logged_in | if then=post.meta.badge_label }}
match
Maps the incoming value to a corresponding output using named key=value pairs. Supports a built-in default argument as a fallback.
{{ post.meta.card_type | match event="Workshop" course="Academy" news="Alert" default="Resource" }}
Numeric matching:
matchuses loose comparison, so an integer value like42will correctly match a string case key of"42".
Data Modifiers
get_post
Hydrates a WP_Post object from a post ID. Use parentheses to access properties on the result.
{{ (post.meta.featured_post_id | get_post).title }}
resolve
Alias for get_post. Useful when the intent reads more naturally as “resolve this ID”.
{{ (post.meta.related_id | resolve).title }}
get_user
Hydrates a WP_User object from a user ID. Same pipeline limitation as get_post — property access via dot notation on the output is not supported.
{{ post.meta.assigned_to | get_user }}
get_meta
Fetches a single meta value by key from a post ID.
{{ post.id | get_meta key="custom_flag" }}
map
Extracts a specific key from every item in an array. Useful for arrays of associative data.
Note:
mapexcludesWP_PostandWP_Userobjects for security — useget_metafor post-level data instead.
{{ post.meta.amenities | map key="label" | join ", " }}
Join Modifier
join
Joins an array of values into a string with a separator. Accepts the separator positionally or as the named glue argument.
{{ post.tags | join ", " }}
→ "WordPress, Gutenberg, Expressions"
Security & Protected Data
The engine proactively blocks access to sensitive data at the resolver level — these restrictions cannot be bypassed by the expression author.
Protected meta keys: Both post.meta property access and the get_meta modifier automatically deny any key that starts with an underscore (WordPress’s convention for private meta, e.g., _edit_lock) as well as explicitly sensitive keys like session_tokens.
User data restrictions: The user context proxy blocks access to database-prefixed role and capability keys (e.g., wp_capabilities, wp_user_level) to prevent leaking site-level permissions through expressions.
HTML output: All expression output is HTML-escaped by default via htmlspecialchars. The raw modifier bypasses this path but still runs through wp_kses_post — tags like <script> and <iframe> are stripped regardless.