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.
More examples
Navigation menu
[
{"label": "Home", "url": "/", "icon": "home"},
{"label": "Products", "url": "/products", "icon": "shop"},
{"label": "Blog", "url": "/blog", "icon": "pen"},
{"label": "Contact", "url": "/contact", "icon": "mail"}
]
Social links
[
{"name": "Twitter", "url": "https://twitter.com/yourhandle", "icon": "twitter"},
{"name": "GitHub", "url": "https://github.com/yourhandle", "icon": "github"},
{"name": "LinkedIn", "url": "https://linkedin.com/in/yourhandle", "icon": "linkedin"}
]
Pricing table
[
{"name": "Starter", "price": "9", "features": "5 projects, 1GB storage"},
{"name": "Pro", "price": "29", "features": "Unlimited projects, 50GB storage"},
{"name": "Enterprise", "price": "99", "features": "Everything, priority support"}
]
Template examples
In the HTML inspector, the Loop block uses get_items() syntax. Query arguments are managed by the sidebar — the inspector shows get_items() with empty parentheses to keep the template readable.
Feature list from custom fields
{% for item in get_items(post.meta('features')) %}
<div class="feature">
<h3>{{ item.title }}</h3>
<p>{{ item.description }}</p>
</div>
{% endfor %}
FAQ accordion from repeater
{% for item in get_items(post.meta('faq')) %}
<details>
<summary>{{ item.question }}</summary>
<p>{{ item.answer }}</p>
</details>
{% endfor %}
get_items() is for data you already have. If you need to query posts from the database, use get_posts() — not get_items() with a list of post IDs.
Next steps
- Loop — loop concept and data sources
- get_posts() — query posts from the database