Query Loop Block

Short url: https://ewp.guide/go/be/query-loop-block

The Query Loop Block allows you to insert a list of posts. This could be a list of Pages, Posts, or even Products, if you’re using WooCommerce.

Once you've added your Block, there are further options available in the Settings Sidebar including an option to change the text and background colors.

When the Query Loop Block is first inserted, you need to select the layout pattern to use for displaying your content. The Carousel view (Query Loop Block Carousel View) or Grid view (Query Loop Block Grid View) icons that appear on the Block toolbar, simply change how the various layout patterns appear in the Block when it’s first inserted, and have no effect on how your content will be displayed within the browser for your theme. The Carousel view allows you to select the block layout pattern using the Previous pattern and Next pattern arrow icons. The Grid view will show all the patterns at once, in a grid layout.

When using the (default) Carousel view, you can select the way the Post content is displayed by clicking the Previous pattern (Query Loop Block Carousel View Previous Pattern) and Next pattern (Query Loop Block Carousel View Next Pattern) arrow icons on the Block Toolbar. You can also click the Start blank link within the Block Toolbar to select the layout pattern.

Query Loop Block

After selecting how you want your content to be displayed, click the Choose button on the Block Toolbar if you’re using the Carousel view, or simply select your desired layout pattern if using the Grid view. Performing either of these actions will confirm how you want your content to display and also give you access to further options on the Block Toolbar and in the Settings Sidebar.

Once you’ve confirmed the layout pattern to use for the Posts List Block, you can use the Display settings (Query Loop Block Display Settings) icon on the Block Toolbar and all the options in the Settings Sidebar to adjust the WordPress Query that is executed to retrieve your posts. You can control the number of posts to display per page, and select the Post type (e.g. display Posts, Pages, or even Products if you’re using WooCommerce). You can also choose the order to display your posts (e.g. newest first, oldest first, alphabetical), and also add filters such as Categories, Tags, Author or Keywords.