Skip to content

Loops

A VX Loop repeats any Elementor element once per item of a VX list. It is not a query loop — it does not run a new WP_Query — it walks a field that already holds several things: a repeater, a gallery, a list, or a relation.

That covers the layouts that are otherwise painful: opening hours, a spec table, a team roster, a set of related posts, an image grid you want full control over.

Setting a loop

  1. Select the element you want repeated. Open the Advanced tab.
  2. Open VX Loop and click Repeat this element for each item of.
  3. The VX picker opens in loop mode — it lists only loopable fields.
  4. Pick the list. Optionally set a limit and an offset.

The element now renders once per item.

Reading the current item

Inside a loop, tags resolve against the active row. If the loop source is @post(hours), then inside it:

@post(hours.day)
@post(hours.open)
@post(hours.close)

This is VX's own loop frame, the same mechanism VX's block loop uses, so anything that reads VX Script — dynamic tags, visibility rules, expressions — sees the current item.

What can be a loop source

Field kindWhat one item is
RepeaterOne row, with its sub-fields
GalleryOne image, with url, alt, width, and the rest
ListOne list value
RelationOne related post, with its own fields

The picker's loop mode only offers fields that qualify, so there is nothing to guess at.

Limit and offset

SettingWhat it does
LimitPrint at most this many items
OffsetSkip this many items first

Together they make "the first three" and "everything after the first three" two copies of the same element — useful when the first item should be styled differently from the rest.

Loops are capped per loop so a runaway list cannot bring a page down.

Nested loops

A looped element can contain another looped element. The frames compose by path, so an inner loop over a repeater inside a relation resolves correctly against the outer item. Build the outer loop first, then put the inner element inside it and give it its own source.

Rules inside a loop

Visibility rules on a looped element are evaluated per item. A loop over a repeater with a rule on the same element prints only the rows that pass — which is the cleanest way to do "show only the days you are open".

In the editor

The editor shows one copy, not the whole loop. That keeps the canvas workable and the panel responsive; check the real output with Elementor's preview.

Looped elements carry a VX icon in the Structure panel, and right-click gives you Copy loop and Paste loop in the VX group.

Elementor V4

Atomic elements get the same loop as a plain prop with its own panel section. Classic and atomic elements loop the same way and nest inside each other.

Built by Code Wattz.