Skip to content

Dynamic tags in Elementor

With the Elementor module on, every VX field is available to Elementor two ways: through Elementor's own dynamic tag list, and through the VX picker — a button beside the dynamic switcher that opens an expression editor with search, autocomplete, and modifiers.

Binding a control, the quick way

  1. Hover the control you want to bind. Elementor shows its dynamic switcher; VX adds a VX button beside it.
  2. Click VX. The picker opens with the fields that fit that control, grouped by where they come from.
  3. Pick a field, or type an expression. Add modifiers if you want them.
  4. Insert. The control now carries a native Elementor dynamic binding — the same thing a click in Elementor's own tag list would have produced.

If you would rather use Elementor's own list: click the dynamic switcher, scroll to the VX group, and choose a tag.

The nine tags

Each tag is registered in the Elementor categories it actually fits, so a tag only appears on controls that can use it.

TagElementor categoriesUse it for
VX FieldText, Post metaAny field as text — the default workhorse
VX LinkURLLink fields, and any field holding a web address
VX NumberNumberNumbers, steppers, sliders
VX ImageImageImage fields, the featured image, the site logo and icon
VX GalleryGalleryGallery fields
VX MediaMediaVideo and audio files
VX ColorColorColor fields
VX DateDate/time, TextDate and date-time fields, with a format
VX ExpressionText, URL, NumberAny VX Script expression at all, typed by hand

Controls every field tag shares

ControlWhat it does
SourceWhich context to read from: Post, Author, User (viewer), Site, or Term
FieldThe field, grouped by fieldset. The list only offers fields whose type fits the control
ModifiersAn optional VX Script modifier chain appended to the field, such as .truncate(40).uppercase()

VX Date

Adds a Format control — a PHP date format, defaulting to the site's own date format. Leave it empty to render the raw stored value. If your modifier chain already contains .date_format(...), that wins and the control is ignored.

VX Image

Resolves the chosen field to both an attachment id and a URL, so Elementor's image controls get everything they need — sizes, srcset, and the lightbox all work as usual. If the field stores an id without a URL, the URL is looked up for you.

VX Expression

The escape hatch. One textarea, any VX Script:

@post(tagline).fallback(@site(tagline))
@post(price).number_format(2)
@author(company).uppercase()
#math(@post(width) * @post(height))

It renders against whatever the element is about — the post, the term, or the user — and its output is sanitized the same way VX sanitizes text in the block editor.

Before / After / Fallback

VX Expression is a plain Elementor Tag, so Elementor's own Advanced section — Before, After, and Fallback — applies to it. That is often the tidiest way to wrap a value in a label or a currency symbol.

The five contexts

The Source control picks the context, and the field list changes with it.

SourceReadsVX Script
PostThe post the element is about@post(key)
AuthorThat post's author@author(key)
User (viewer)Whoever is looking at the page@user(key)
SiteSite-wide values and option pages@site(key)
TermThe term being viewed, on a term template@term(key)

The site logo and icon

VX's own Site group has no logo field. The module adds two:

@site(logo)
@site(icon)

Both behave like any other media value, with the same sub-properties the featured image has — url, alt, title, caption, id, width, height, mime. They resolve everywhere VX Script runs, not only in Elementor: block bindings and visibility rules see them too.

The VX picker

The picker is one modal built around one expression box.

PartWhat it does
Field treeEvery field in the chosen context, in its fieldset's folder, filtered to what the control accepts
SearchType to search every context at once, not just the one selected
Expression boxType VX Script directly, with autocomplete: fields after @post(, modifiers after .
Modifier listThe modifiers that apply to the value you have, added with a click
PreviewWhat the expression renders to right now, against the document being edited

Inserting writes a native dynamic-tag binding through Elementor's own commands. Nothing in Elementor is overridden, so the binding behaves exactly like one Elementor made itself — including undo, copy/paste, and the dynamic switcher's own indicator.

Sub-properties

Media and relation fields carry more than one value. Add the property inside the parentheses:

@post(hero.url)
@post(hero.alt)
@post(hero.width)
@post(related.title)

The picker offers these as children of the field in the tree, so you rarely have to type them.

Modifiers

Modifiers are VX Script's, not ours — anything VX supports works here. Common ones:

ModifierEffect
.fallback(…)Use this when the field is empty
.truncate(40)Cut to 40 characters
.uppercase() / .lowercase()Case
.date_format("F j, Y")Format a date
.number_format(2)Format a number

Chain them left to right: @post(summary).truncate(120).fallback(@post(excerpt)).

A modifier chain must start with a dot

The Modifiers control appends its contents to the field expression only when it starts with .. truncate(40) on its own is ignored; .truncate(40) is not.

Where tags resolve

The same expressions work in more places than the Elementor tags:

  • Visibility rules on any element — see Visibility rules
  • Loops on any element — see Loops
  • Gutenberg block bindings, through VX's own binding support
  • Bricks dynamic tags, where VX Modules publishes the store data as {vxm_…} tags

The Structure panel

Elementor's navigator shows a VX icon on every element that carries a VX field binding, VX visibility rules, or a VX loop — so a long page tells you at a glance where the dynamic parts are. Elementor's own indicators keep working alongside it.

Right-clicking an element adds a VX group to the context menu: copy and paste visibility rules, copy and paste a loop. The clipboard is Elementor's own, so a copy survives a reload and works across editor tabs, exactly like Paste style.

Built by Code Wattz.