Query template
The layout for one item in a query, repeated for every result.
The Query Template is the layout for a single item in a query: the title, date, featured image, excerpt, and whatever else you place. You build it once, and Slowly renders it for every post or page the query returns.
Inside it you use dynamic values to pull each item's own content, so one design covers the whole set.
Adding one
- Select the query block that will contain it.
- Open the inserter and search "query-template".
- Pick the Query Template block, then add your child blocks inside.
The Query Template only works as a direct child of a query block.
Settings
In the query template's own panel. Appearance lives in the shared design panel.
| Setting | What it does | Reach for it when |
|---|---|---|
| Columns | Number of columns for the grid; defaults to 3 | A multi-column post grid or card layout |
| Minimum column width | Narrowest each column can get before the grid reflows | You want the grid to adapt without a separate breakpoint setting |
| Auto fit / Auto fill | Whether empty columns collapse (fit) or hold their space (fill) | Fit suits most grids; fill keeps structure when results are few |
| Column gap | Horizontal space between items | Tuning breathing room between cards |
| Row gap | Vertical space between rows | Tightening or loosening a tall list |
| Row height | Fixed row height in the grid | Equal-height rows, for example in a masonry-alternative layout |
| Masonry | Lays items in a variable-height masonry pattern | Image-heavy grids where card heights differ |
| Slider | Turns the repeated items into a carousel | A featured-posts slider or a product highlight reel |
Styling
The query template uses the shared design panel for spacing, type, colour, borders, and effects, all per breakpoint. Style child blocks individually to control how each piece of content looks inside one item. For hover effects on the whole card, set them on the query template itself via states.
Accessibility
Each repeated item should have a meaningful heading so screen-reader users can navigate a list of results by heading. If the layout uses a linked image as the primary click target, the image needs alt text that describes the post, not just its appearance, and the link needs a label that makes sense without surrounding context.