Query Loop
A query loop is a block that asks the database for a set of posts and then repeats one design for each result, so a hundred entries share a single layout.
In plain English
You design one card: the image, the title, the excerpt, the little category tag. Then you tell the loop what to fetch, and it draws that card once for every post it finds.
Add a post tomorrow and it appears in the grid without you touching the page, because the page never contained the posts in the first place. It contained the question.
Why it matters
It is what turns a website into something maintainable. Publishing becomes writing the content, not rebuilding the listing page.
It is also where custom post types pay off. A tutorials grid, a glossary index and a product listing are the same tool pointed at different content.
How it works
-
You choose the sourcePost type, category, tag, author, or a custom field condition.
-
You set the order and the limitNewest first, alphabetical, or by a field you control, showing as many as the page should hold.
-
You design one itemUsing dynamic tags so each field pulls from whichever post is being drawn.
-
The loop repeats itOnce per result, with pagination underneath if there are more than fit.
Big loops get slow
A loop showing every post on a busy site queries a lot of rows on every load. Limit it, paginate it, and let caching hold the result.