Query Items
This page covers how to loop over raw data — static arrays, ACF repeater fields, or any dynamic data.
Unlike the Post, Term, and User query types, Item doesn't query the database. It wraps existing data so you can loop over it.
Basic usage
Paste this directly into the query arguments editor in the Loop block's sidebar:
[
{"name": "Home", "url": "/"},
{"name": "About", "url": "/about"}
]
Inline arrays
Array of objects
Each object becomes an item with named properties:
[
{"name": "Home", "url": "/"},
{"name": "About", "url": "/about"},
{"name": "Contact", "url": "/contact"}
]
Simple values
When items are plain strings or numbers, item is the value itself:
["Home", "About", "Services", "Contact"]
Numbered items
[0, 1, 2, 3, 4]
Key-value pairs
When items are an object (associative array), each entry is automatically converted to an item with key and value properties:
{
"color": "red",
"size": "large",
"weight": "2kg"
}
Access them in your template:
{% for item in get_items() %}
<dt>{{ item.key }}</dt>
<dd>{{ item.value }}</dd>
{% endfor %}
ACF fields
Enter a dynamic expression in the sidebar editor to loop over ACF data.
Repeater fields
Loop over repeater rows — each row's sub-fields become item properties:
post.meta('team_members')
Nested repeaters — use a second Loop block inside the first:
member.social_links
Relationship and post object fields
These return full post objects, so you can access post provider fields directly:
post.meta('related_posts')
{% for item in get_items() %}
<a href="{{ item.link }}">{{ item.title }}</a>
{% endfor %}
This also works with user, taxonomy, image, and gallery fields — Unblock auto-converts them to their matching provider objects.