The Query Loop block allows you to display posts based on specified parameters; like a PHP loop without the code.
It uses all of the core blocks that you are already familiar with. You can display the posts in columns (or not) with our Grid block, and display all of the post data (titles, dates, excerpts) with the Headline and Button blocks.
Inserting a Query Loop Block
First, make sure you’ve already added a Container Block. It’s good practice to wrap your query loop in a surrounding Container, as it gives you more options moving forward.
Once you choose the Query Loop Block in the editor, you’ll be given a choice of layout presets.
The query parameters allow you to customize further what posts are being displayed.
Select post type
This list shows all the registered post types. The common types include page, post, product (if using WooCommerce), and your custom post types.
Posts per page
Set the numbers of posts per page for this block.
Add additional parameters to further customize the posts displayed in this block.
See full detailed explanations on the WP_Query page.
Clicking the Layout panel selects the Grid block that is positioned under the Query loop block. It allows you to configure the column settings if needed and the options are exactly the same as in the Grid block.