WordPress glossary

Query Loop

A block that displays a list of posts, based on settings you choose.

The Query Loop block was introduced in WordPress 5.8, and it’s what block themes use to show lists of posts: the latest posts on the blog page, the posts in a category archive, the search results, and so on. You can also add it to any post, page or template yourself, to show a selection of posts anywhere on your site. The tutorials carousel further down this page is built with a Query Loop block.

The settings of the block decide which posts it shows. You can choose the post type, filter the posts by category, tag, author or keyword, set how many posts to show, and change the order they’re shown in. In archive templates, the block is usually set to use the default query instead, which means it shows whatever posts belong on the page being viewed, like the posts in the category you’re browsing.

Inside the Query Loop, the Post Template block decides what each post in the list looks like. It contains blocks like the post title, featured image, date and excerpt, which are repeated for every post. The Query Loop can also include a Pagination block for moving between pages of posts, and a No Results block that’s shown when there are no posts to display.

Published November 23, 2026

Related terms