{"id":14633622,"date":"2021-07-08T15:58:15","date_gmt":"2021-07-08T15:58:15","guid":{"rendered":"https:\/\/wordpress.org\/support\/?post_type=helphub_article&#038;p=14633622"},"modified":"2026-05-25T06:31:21","modified_gmt":"2026-05-25T06:31:21","slug":"query-loop-block","status":"publish","type":"helphub_article","link":"https:\/\/wordpress.org\/documentation\/article\/query-loop-block\/","title":{"rendered":"Query Loop block"},"content":{"rendered":"\n<p class=\"has-text-align-right has-small-font-size wp-block-paragraph\"><a href=\"https:\/\/wordpress.org\/documentation\/article\/blocks\/\">Go back to the list of <strong>Blocks<\/strong><\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The Query Loop block is an advanced block that allows you to display posts based on specified parameters, like a PHP loop without the code. You can think of it as a more complex and powerful <a href=\"https:\/\/wordpress.org\/documentation\/article\/latest-posts-block\/\">Latest Posts Block<\/a>. With various block patterns integrated into the block setup, you can do things like create a portfolio or a page full of your favorite recipes.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1964\" height=\"1398\" src=\"https:\/\/wordpress.org\/documentation\/files\/2021\/07\/query-loop-grid-featured-image.png\" alt=\"Query Loop set to Grid feating 6 posts about national parks that include featured images.\" class=\"wp-image-16368206\" style=\"aspect-ratio:1.4048444037656904;width:756px;height:auto\" srcset=\"https:\/\/wordpress.org\/documentation\/files\/2021\/07\/query-loop-grid-featured-image.png 1964w, https:\/\/wordpress.org\/documentation\/files\/2021\/07\/query-loop-grid-featured-image-300x214.png 300w, https:\/\/wordpress.org\/documentation\/files\/2021\/07\/query-loop-grid-featured-image-1024x729.png 1024w, https:\/\/wordpress.org\/documentation\/files\/2021\/07\/query-loop-grid-featured-image-768x547.png 768w, https:\/\/wordpress.org\/documentation\/files\/2021\/07\/query-loop-grid-featured-image-1536x1093.png 1536w\" sizes=\"auto, (max-width: 1964px) 100vw, 1964px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Add a Query Loop block<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To add the Query Loop block to the page, click (+) icon to open the block inserter pop-up window. Look for the Query Loop using the search bar and click the block icon to add it to the editor.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Alternatively, you can quickly add the Query Loop block by typing&nbsp;<code>\/query loop<\/code>&nbsp;and pressing Enter.<\/p>\n\n\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"730\" height=\"278\" src=\"https:\/\/wordpress.org\/documentation\/files\/2021\/07\/query-loop-add-block.png\" alt=\"Query Loop selected from the block list modal that appears when typing \/query loop in the editor.\" class=\"wp-image-16368209\" style=\"aspect-ratio:2.6260358192996525;width:334px;height:auto\" srcset=\"https:\/\/wordpress.org\/documentation\/files\/2021\/07\/query-loop-add-block.png 730w, https:\/\/wordpress.org\/documentation\/files\/2021\/07\/query-loop-add-block-300x114.png 300w\" sizes=\"auto, (max-width: 730px) 100vw, 730px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">After adding the Query Loop block you will see two options:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Choose<\/strong><\/li>\n\n\n\n<li><strong>Start blank<\/strong><\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1986\" height=\"532\" src=\"https:\/\/wordpress.org\/documentation\/files\/2021\/07\/query-loop-add-block-options.png\" alt=\"Query Loop options when first adding to the page to choose a pattern or start blank with default layouts.\" class=\"wp-image-16368210\" style=\"aspect-ratio:3.7330293062200957;width:855px;height:auto\" srcset=\"https:\/\/wordpress.org\/documentation\/files\/2021\/07\/query-loop-add-block-options.png 1986w, https:\/\/wordpress.org\/documentation\/files\/2021\/07\/query-loop-add-block-options-300x80.png 300w, https:\/\/wordpress.org\/documentation\/files\/2021\/07\/query-loop-add-block-options-1024x274.png 1024w, https:\/\/wordpress.org\/documentation\/files\/2021\/07\/query-loop-add-block-options-768x206.png 768w, https:\/\/wordpress.org\/documentation\/files\/2021\/07\/query-loop-add-block-options-1536x411.png 1536w\" sizes=\"auto, (max-width: 1986px) 100vw, 1986px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Choose a pattern<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The Choose option allows you to select from patterns in your theme that use the Query Loop. Each Query Loop block is made up of various nested post blocks, like the <a href=\"https:\/\/wordpress.org\/documentation\/article\/post-featured-image-block\/\" data-type=\"helphub_article\" data-id=\"15466731\">Featured Image<\/a>, <a href=\"https:\/\/wordpress.org\/documentation\/article\/post-excerpt-block\/\" data-type=\"helphub_article\" data-id=\"15473605\">Excerpt<\/a>, and <a href=\"https:\/\/wordpress.org\/documentation\/article\/pagination-block\/\" data-type=\"helphub_article\" data-id=\"16282234\">Pagination<\/a> blocks. So depending on which pattern you choose, the blocks your Query Loop starts with may vary.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"2400\" height=\"1308\" src=\"https:\/\/wordpress.org\/documentation\/files\/2026\/05\/query-loop-choose-pattern.jpg\" alt=\"Choose a pattern modal open with different grid and list pattern options for the Query Loop block in the 2025 WordPress Theme.\" class=\"wp-image-16368214\" style=\"aspect-ratio:1.8348857285655868;width:756px;height:auto\" srcset=\"https:\/\/wordpress.org\/documentation\/files\/2026\/05\/query-loop-choose-pattern.jpg 2400w, https:\/\/wordpress.org\/documentation\/files\/2026\/05\/query-loop-choose-pattern-300x164.jpg 300w, https:\/\/wordpress.org\/documentation\/files\/2026\/05\/query-loop-choose-pattern-1024x558.jpg 1024w, https:\/\/wordpress.org\/documentation\/files\/2026\/05\/query-loop-choose-pattern-768x419.jpg 768w, https:\/\/wordpress.org\/documentation\/files\/2026\/05\/query-loop-choose-pattern-1536x837.jpg 1536w, https:\/\/wordpress.org\/documentation\/files\/2026\/05\/query-loop-choose-pattern-2048x1116.jpg 2048w\" sizes=\"auto, (max-width: 2400px) 100vw, 2400px\" \/><figcaption class=\"wp-element-caption\">Example of pattern options for the Query Loop in the WordPress Twenty Twenty-Five theme<\/figcaption><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Start blank<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">If you select the Start blank option, you can select different variations of the Query Loop to start with. Each variation starts with a different combination of nested post blocks. You can remove these nested blocks or add additional ones after adding the block to the page.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1980\" height=\"446\" src=\"https:\/\/wordpress.org\/documentation\/files\/2026\/05\/query-loop-start-blank-post-options.png\" alt=\"Default layout options when selecting Start blank in the Query Loop, including Title &amp; Date and Image, Date, &amp; Title.\" class=\"wp-image-16368213\" srcset=\"https:\/\/wordpress.org\/documentation\/files\/2026\/05\/query-loop-start-blank-post-options.png 1980w, https:\/\/wordpress.org\/documentation\/files\/2026\/05\/query-loop-start-blank-post-options-300x68.png 300w, https:\/\/wordpress.org\/documentation\/files\/2026\/05\/query-loop-start-blank-post-options-1024x231.png 1024w, https:\/\/wordpress.org\/documentation\/files\/2026\/05\/query-loop-start-blank-post-options-768x173.png 768w, https:\/\/wordpress.org\/documentation\/files\/2026\/05\/query-loop-start-blank-post-options-1536x346.png 1536w\" sizes=\"auto, (max-width: 1980px) 100vw, 1980px\" \/><\/figure>\n\n\n\n<p class=\"has-text-align-left has-background wp-block-paragraph\" style=\"background-color:#e5f4fa\"><a href=\"https:\/\/wordpress.org\/documentation\/article\/adding-a-new-block\/\">Detailed instructions on adding blocks<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Anatomy of the Query Loop block<\/h2>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"698\" height=\"916\" src=\"https:\/\/wordpress.org\/documentation\/files\/2021\/07\/query-loop-list-view.png\" alt=\"Query Loop open in List View showing the post template, featured image, post title, title, pagination, and no results block.\" class=\"wp-image-16368203\" style=\"aspect-ratio:0.762023679457736;width:336px;height:auto\" srcset=\"https:\/\/wordpress.org\/documentation\/files\/2021\/07\/query-loop-list-view.png 698w, https:\/\/wordpress.org\/documentation\/files\/2021\/07\/query-loop-list-view-229x300.png 229w\" sizes=\"auto, (max-width: 698px) 100vw, 698px\" \/><figcaption class=\"wp-element-caption\">Example in List View of a Query Loop block<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Once added to the page, open <a href=\"https:\/\/wordpress.org\/documentation\/article\/list-view\/\">List View<\/a> to see how the Query Loop is structured. The Query Loop is made up of several nested parts, and each one controls a different part of the display.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Query Loop<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Use the Query Loop block settings to control which posts appear. This includes options such as post type, filters, order, and the number of items shown.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Post Template<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Post Template is a container block inside the Query Loop that controls the layout that repeats for each post in the Query Loop. For example, you can display posts in a list or grid. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The Post Template accepts inner blocks. You can add post blocks, such as the post Title, Featured Image, Excerpt, Date, and other blocks like Group, Columns, or Row to create more custom layouts. Common blocks you may use inside the Post Template include: <\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/wordpress.org\/documentation\/article\/title-block\/\" data-type=\"helphub_article\" data-id=\"16365943\">Title<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/wordpress.org\/documentation\/article\/post-excerpt-block\/\" data-type=\"helphub_article\" data-id=\"15473605\">Excerpt<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/wordpress.org\/documentation\/article\/post-date-block\/\" data-type=\"helphub_article\" data-id=\"15480868\">Date<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/wordpress.org\/documentation\/article\/post-featured-image-block\/\" data-type=\"helphub_article\" data-id=\"15466731\">Featured Image<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/wordpress.org\/documentation\/article\/read-more-block\/\" data-type=\"helphub_article\" data-id=\"15779630\">Read More<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/wordpress.org\/documentation\/article\/post-author-block\/\" data-type=\"helphub_article\" data-id=\"16221042\">Author<\/a> <\/li>\n\n\n\n<li><a href=\"https:\/\/wordpress.org\/documentation\/article\/categories-block\/\" data-type=\"helphub_article\" data-id=\"15480378\">Categories<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/wordpress.org\/documentation\/article\/post-tags-block\/\" data-type=\"helphub_article\" data-id=\"15480464\">Tags<\/a><\/li>\n<\/ul>\n\n\n\n<p class=\"has-text-align-left has-background wp-block-paragraph\" style=\"background-color:#e5f4fa\"><a href=\"https:\/\/wordpress.org\/documentation\/article\/post-template-block\/\">Learn more about the Post Template block<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Pagination (optional)<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The Pagination block to let visitors move through multiple pages of results. You can choose which navigation elements to include, such as previous and next links or page numbers. Remove this block if it&#8217;s not needed \u2014 you can add it back at any time if desired.<\/p>\n\n\n\n<p class=\"has-text-align-left has-background wp-block-paragraph\" style=\"background-color:#e5f4fa\"><a href=\"https:\/\/wordpress.org\/documentation\/article\/pagination-block\/\">Learn more about the Pagination block<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">No Results (optional)<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Use No Results to add a message that appears when the query does not find any posts. This message only displays on the published page when there are no matching results. You can delete the No Results section, but it&#8217;s recommended so that this area does not appear blank for visitors if no posts are able to display.<\/p>\n\n\n\n<figure class=\"wp-block-video\"><video height=\"1654\" style=\"aspect-ratio: 3020 \/ 1654;\" width=\"3020\" controls src=\"https:\/\/wordpress.org\/documentation\/files\/2026\/05\/query-loop-no-posts-found.mov\"><\/video><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">How to customize the appearance<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The Query Loop block is made up of nested blocks. To customize how posts appear, select the part of the Query Loop you want to change, such as the Query Loop, Post Template, Title, Featured Image, or Pagination block.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Use <a href=\"https:\/\/wordpress.org\/documentation\/article\/list-view\/\" data-type=\"helphub_article\" data-id=\"14641368\">List View<\/a> to see the nested block structure and select the correct block. Changes made inside the Post Template repeat for each post in the Query Loop. For example, if you move the Featured Image above the Post Title, that change applies to every post in the list.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Common customizations<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Common ways to customize the Query Loop include:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Change how many posts appear, or filter them by category or tag, in the Query Loop block\u2019s settings.<\/li>\n\n\n\n<li>Change width, alignment, spacing, or color settings for supported blocks.<\/li>\n\n\n\n<li>Switch between list and grid layouts by selecting the Post Template block.<\/li>\n\n\n\n<li>Add or remove additional blocks inside the Post Template, such as Featured Image, Excerpt, Author, or Date.<\/li>\n\n\n\n<li>Add layout blocks, such as Group, Columns, or Row, to create a more custom repeated post layout.<\/li>\n\n\n\n<li>Rearrange blocks inside the Post Template using drag and drop or List View.<\/li>\n\n\n\n<li>Customize the No Results block message that displays when no posts are found.<\/li>\n<\/ul>\n\n\n\n<p class=\"has-text-align-left has-background wp-block-paragraph\" style=\"background-color:#e5f4fa\"><strong>Note:<\/strong> If you do not see options for choosing a post type, filter settings, or other query settings, select the Query Loop block and change <a href=\"#query-type\" data-type=\"internal\" data-id=\"#query-type\">Query Type<\/a> from Default to Custom in the block settings sidebar. <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Link titles and images to posts<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Post titles and featured images inside the Query Loop do not automatically link to the post or page in every layout. To make them clickable, select each nested block and enable its link setting.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Select the <a href=\"https:\/\/wordpress.org\/documentation\/article\/title-block\">Title block<\/a> and turn on <strong>Make title a link<\/strong>.<\/li>\n\n\n\n<li>Select the <a href=\"https:\/\/wordpress.org\/documentation\/article\/post-featured-image-block\">Featured Image<\/a> block and turn on <strong>Link to Post.<\/strong><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">These settings apply to each item shown by the Query Loop because they are inside the Post Template.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Styles<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The Query Loop block itself does not include style settings like color and spacing. Select a nested block inside the Query Loop, such as the Post Template, Title, or Excerpt, and use that block\u2019s settings to change styles.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Block toolbar<\/h2>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"704\" height=\"172\" src=\"https:\/\/wordpress.org\/documentation\/files\/2026\/05\/query-loop-block-toolbar.png\" alt=\"Query Look block toolbar settings including transform, alignment controls, change design button, and more options (three dots). \" class=\"wp-image-16368216\" style=\"aspect-ratio:4.09338306395911;width:422px;height:auto\" srcset=\"https:\/\/wordpress.org\/documentation\/files\/2026\/05\/query-loop-block-toolbar.png 704w, https:\/\/wordpress.org\/documentation\/files\/2026\/05\/query-loop-block-toolbar-300x73.png 300w\" sizes=\"auto, (max-width: 704px) 100vw, 704px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Each block toolbar comes with different options. These block toolbars let you customize or modify the block in the editor.&nbsp;To view the block toolbar, select the Query Loop block. The toolbar gives you quick access to common block actions, such as moving the block, changing its alignment, replacing the design, or opening more options.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The Query Loop block toolbar includes:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Transform to<\/li>\n\n\n\n<li>Move controls<\/li>\n\n\n\n<li>Change alignment<\/li>\n\n\n\n<li>Change design<\/li>\n\n\n\n<li>More options<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Transform to<\/h3>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"702\" height=\"458\" src=\"https:\/\/wordpress.org\/documentation\/files\/2026\/05\/query-loop-transform.png\" alt=\"Transform dropdown settings in the Query Loop showing Group, Columns, and Details.\" class=\"wp-image-16368219\" style=\"width:348px;height:auto\" srcset=\"https:\/\/wordpress.org\/documentation\/files\/2026\/05\/query-loop-transform.png 702w, https:\/\/wordpress.org\/documentation\/files\/2026\/05\/query-loop-transform-300x196.png 300w\" sizes=\"auto, (max-width: 702px) 100vw, 702px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The Transform to tool allows you to convert the Query Loop block into the Group, Columns, or Details blocks. <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Move controls<\/h3>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"706\" height=\"136\" src=\"https:\/\/wordpress.org\/documentation\/files\/2026\/05\/query-loop-move-controls.png\" alt=\"Move controls in the Query Loop block toolbar including drag\/drop (six dots) and up\/down arrows.\" class=\"wp-image-16368220\" style=\"width:426px;height:auto\" srcset=\"https:\/\/wordpress.org\/documentation\/files\/2026\/05\/query-loop-move-controls.png 706w, https:\/\/wordpress.org\/documentation\/files\/2026\/05\/query-loop-move-controls-300x58.png 300w\" sizes=\"auto, (max-width: 706px) 100vw, 706px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Click the the drag\/drop button (six dots) to move the block to anew location on the page. A blue separator line appears to indicate where the block will be placed. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The up and down arrow icons can be used to move the block up and down on the page.<\/p>\n\n\n\n<p class=\"has-background wp-block-paragraph\" style=\"background-color:#e5f4fa\"><a href=\"https:\/\/wordpress.org\/documentation\/article\/moving-blocks\/\">Get more information about moving a block within the editor.<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Change alignment<\/h3>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"740\" height=\"444\" src=\"https:\/\/wordpress.org\/documentation\/files\/2026\/05\/query-loop-align-options.png\" alt=\"Align controls in the Query Loop block toolbar to change the width of the block from narrow to wider.\" class=\"wp-image-16368221\" style=\"width:392px;height:auto\" srcset=\"https:\/\/wordpress.org\/documentation\/files\/2026\/05\/query-loop-align-options.png 740w, https:\/\/wordpress.org\/documentation\/files\/2026\/05\/query-loop-align-options-300x180.png 300w\" sizes=\"auto, (max-width: 740px) 100vw, 740px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Use the change alignment tool to align the Query Loop block. Choose one of the following options:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>None \u2013 <\/strong>leaves the block the current size.<\/li>\n\n\n\n<li><strong>Wide width \u2013 <\/strong>increase the width of the block beyond the content size.<\/li>\n\n\n\n<li><strong>Full width \u2013 <\/strong>extend the block to cover the full width of the screen.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">The Wide width and Full width alignment settings must be enabled by your WordPress theme.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Change design<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Use Change design to choose a different Query Loop design or pattern. This replaces the current Query Loop layout with the selected design.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"721\" src=\"https:\/\/wordpress.org\/documentation\/files\/2026\/05\/query-loop-change-design-1024x721.png\" alt=\"Change design selected in the Query Loop block toolbar showing additional patterns to select.\" class=\"wp-image-16368222\" style=\"aspect-ratio:1.420285908781484;width:751px;height:auto\" srcset=\"https:\/\/wordpress.org\/documentation\/files\/2026\/05\/query-loop-change-design-1024x721.png 1024w, https:\/\/wordpress.org\/documentation\/files\/2026\/05\/query-loop-change-design-300x211.png 300w, https:\/\/wordpress.org\/documentation\/files\/2026\/05\/query-loop-change-design-768x541.png 768w, https:\/\/wordpress.org\/documentation\/files\/2026\/05\/query-loop-change-design.png 1404w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Example of patterns to select in the WordPress Twenty Twenty-Five theme when selecting Change design in the Query Loop block toolbar.<\/figcaption><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">More options<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Use More options to access additional block actions, such as duplicate, copy, group, lock, or delete. Available options may vary depending on your theme and permissions.<\/p>\n\n\n\n<p class=\"has-background wp-block-paragraph\" style=\"background-color:#e5f4fa\"><a href=\"https:\/\/wordpress.org\/documentation\/article\/more-options\/\">Read about these and other settings<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Where to find other Query Loop settings<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The following settings were previously available in the Query Loop block toolbar, but are now managed in other places:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>List View <\/li>\n\n\n\n<li>Grid View <\/li>\n\n\n\n<li>Items per page<\/li>\n\n\n\n<li>Offset<\/li>\n\n\n\n<li>Max pages to show<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">To switch between list and grid layouts, select the <a href=\"https:\/\/wordpress.org\/documentation\/article\/post-template-block\/\" data-type=\"helphub_article\" data-id=\"16228384\">Post Template block<\/a>. In the block toolbar, you can select List View or Grid View to stack your posts in a list or display them in multiple columns within a grid.<\/p>\n\n\n\n<figure class=\"wp-block-video aligncenter\"><video height=\"1654\" style=\"aspect-ratio: 3020 \/ 1654;\" width=\"3020\" controls src=\"https:\/\/wordpress.org\/documentation\/files\/2026\/05\/query-loop-list-and-grid-view.mp4\"><\/video><figcaption class=\"wp-element-caption\">Switch between List and Grid layout in the Post Template block toolbar.<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Items per page, Offset, and Max pages to show are now managed in the Display section of the Query Loop&#8217;s block settings sidebar. Refer to the <a href=\"#display-options\" data-type=\"internal\" data-id=\"#display-settings\">Display options<\/a> section on this page for instructions.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Block Settings<\/h2>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"453\" height=\"104\" src=\"https:\/\/wordpress.org\/documentation\/files\/2019\/03\/block-settings-7-0.png\" alt=\"Settings button highlighted in the block editor next to the Save button.\" class=\"wp-image-16368002\" style=\"aspect-ratio:4.356277786294649;width:349px;height:auto\" srcset=\"https:\/\/wordpress.org\/documentation\/files\/2019\/03\/block-settings-7-0.png 453w, https:\/\/wordpress.org\/documentation\/files\/2019\/03\/block-settings-7-0-300x69.png 300w\" sizes=\"auto, (max-width: 453px) 100vw, 453px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Use the Settings section to customize and control which content appears in the Query Loop. To open it, select the block and click the settings icon next to the <strong>Publish\/Update <\/strong>button.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Layout<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Use the Layout settings to control how nested blocks inside the Query Loop use the available width and additional alignment options for content. The Query Loop block includes the Inner blocks use content width setting. When this setting is turned off, nested blocks fill the width of the Query Loop container. <\/p>\n\n\n\n<p class=\"has-background wp-block-paragraph\" style=\"background-color:#e5f4fa\">Visit the <a href=\"https:\/\/wordpress.org\/documentation\/article\/layout-settings-overview\/\">Layout Settings Overview<\/a> guide for more information about these settings. <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Settings<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">Query Type<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">To choose which posts appear, set Query Type to Custom. This shows options for post type, order, sticky posts, display settings, and filters.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"513\" height=\"1024\" src=\"https:\/\/wordpress.org\/documentation\/files\/2026\/05\/query-loop-custom-query-type-selected-outlined-513x1024.png\" alt=\"Custom query type selected in the Query Loop block settings\" class=\"wp-image-16368227\" style=\"aspect-ratio:0.5009829502805876;width:260px;height:auto\" srcset=\"https:\/\/wordpress.org\/documentation\/files\/2026\/05\/query-loop-custom-query-type-selected-outlined-513x1024.png 513w, https:\/\/wordpress.org\/documentation\/files\/2026\/05\/query-loop-custom-query-type-selected-outlined-150x300.png 150w, https:\/\/wordpress.org\/documentation\/files\/2026\/05\/query-loop-custom-query-type-selected-outlined.png 556w\" sizes=\"auto, (max-width: 513px) 100vw, 513px\" \/><figcaption class=\"wp-element-caption\">Custom Query Types selected<\/figcaption><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Custom <\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">The Custom query type lets you choose which content appears. Use Custom when adding a Query Loop to a regular page or post, or when you want to choose the post type, order, number of items, or filters yourself.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Default<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">The Default query type uses the list of posts WordPress already expects to show in that location. This option is mainly used when the Query Loop is part of a template or archive-style page, such as a blog\/posts page, category page, tag page, author page, or search results page.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Post type<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">WordPress contains different types of content, and they are divided into collections called \u201cPost types\u201d. By default, there are a few different ones, such as blog posts and pages, but plugins could add more. Other content types may be displayed here if your site includes plugins or custom post types.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Order by<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Newest to Oldest (default)<\/li>\n\n\n\n<li>Oldest to Newest<\/li>\n\n\n\n<li>Alphabetical A to Z<\/li>\n\n\n\n<li>Alphabetical Z to A<\/li>\n\n\n\n<li>Ascending by order<\/li>\n\n\n\n<li>Descending by order<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Sticky posts<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">This option allows you to choose between three options:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Include (default)<\/strong> \u2013 Displays sticky posts.<\/li>\n\n\n\n<li><strong>Exclude<\/strong> \u2013 Removes sticky posts.<\/li>\n\n\n\n<li><strong>Ignore<\/strong> &#8211; Ignore sticky posts.<\/li>\n\n\n\n<li><strong>Only<\/strong> \u2013 Shows only sticky posts.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Filters<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Use Filters to control which posts appear in the Query Loop. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you do not see this section, change Query type from Default to Custom. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Filter settings are hidden<\/strong> until you add them. Select the Filter options button (+), then choose the filter you want to use. The filters available <strong>may change<\/strong> depending on the selected post type, theme, and plugins used on your site.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"501\" src=\"https:\/\/wordpress.org\/documentation\/files\/2026\/05\/query-loop-select-filters-button-1024x501.png\" alt=\"Filters option label displays when hover over the + icon in the block settings in the Filters section.\" class=\"wp-image-16368231\" style=\"width:504px;height:auto\" srcset=\"https:\/\/wordpress.org\/documentation\/files\/2026\/05\/query-loop-select-filters-button-1024x501.png 1024w, https:\/\/wordpress.org\/documentation\/files\/2026\/05\/query-loop-select-filters-button-300x147.png 300w, https:\/\/wordpress.org\/documentation\/files\/2026\/05\/query-loop-select-filters-button-768x376.png 768w, https:\/\/wordpress.org\/documentation\/files\/2026\/05\/query-loop-select-filters-button.png 1092w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Filter options you can enable.<\/figcaption><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Taxonomies<\/strong> &#8211; Show or hide posts based on <a href=\"https:\/\/wordpress.org\/documentation\/article\/posts-categories-screen\/\">categories<\/a> and <a href=\"https:\/\/wordpress.org\/documentation\/article\/posts-tags-screen\/\">tags<\/a>. \n<ul class=\"wp-block-list\">\n<li>You can also exclude posts by categories and tags.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Authors:<\/strong> Show posts by one or more selected authors.<\/li>\n\n\n\n<li><strong>Keyword<\/strong> &#8211; Show posts that match one or more keywords. \n<ul class=\"wp-block-list\">\n<li>If you enter more than one keyword, results must match every keyword. <\/li>\n\n\n\n<li>You cannot use this filter to show results that match only one of several keywords.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Format<\/strong> &#8211; Show posts assigned to a specific <a href=\"https:\/\/developer.wordpress.org\/advanced-administration\/wordpress\/post-formats\/\">Post Format<\/a>, such as Aside, Gallery, Image, Link, Quote, Status, Video, Audio, or Chat. \n<ul class=\"wp-block-list\">\n<li>Post Formats are different from visual formatting, and your theme may not support them.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"435\" height=\"1024\" src=\"https:\/\/wordpress.org\/documentation\/files\/2026\/05\/query-loop-filter-options-435x1024.png\" alt=\"All filter option in the Query Loop block settings including categories, tags, authors, keyword, and formats.\" class=\"wp-image-16368229\" style=\"aspect-ratio:0.4248053852807341;width:291px;height:auto\" srcset=\"https:\/\/wordpress.org\/documentation\/files\/2026\/05\/query-loop-filter-options-435x1024.png 435w, https:\/\/wordpress.org\/documentation\/files\/2026\/05\/query-loop-filter-options-127x300.png 127w, https:\/\/wordpress.org\/documentation\/files\/2026\/05\/query-loop-filter-options.png 560w\" sizes=\"auto, (max-width: 435px) 100vw, 435px\" \/><figcaption class=\"wp-element-caption\">All filter options enabled for posts in the Query Loop<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Depending on your site, you may also see filters for custom taxonomies added by a theme or plugin, such as <a href=\"https:\/\/wordpress.org\/plugins\/woocommerce\/\">WooCommerce<\/a> product categories. These filters work like categories or tags and let you show content assigned to specific taxonomy terms.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If Post type is set to Page, you may see different filter options, such as:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Authors<\/strong> &#8211;  Show pages by one or more selected authors.<\/li>\n\n\n\n<li><strong>Keyword<\/strong> &#8211;  Show pages that match one or more keywords.<\/li>\n\n\n\n<li><strong>Parents<\/strong> &#8211; Show pages nested under one or more selected parent pages.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"562\" height=\"580\" src=\"https:\/\/wordpress.org\/documentation\/files\/2026\/05\/query-loop-page-filter-options.png\" alt=\"Page filter options shown in the Query Loop block settings when pages are selected including authors, keyword, and the parents field.\" class=\"wp-image-16368232\" style=\"aspect-ratio:0.9689917355371901;width:280px;height:auto\" srcset=\"https:\/\/wordpress.org\/documentation\/files\/2026\/05\/query-loop-page-filter-options.png 562w, https:\/\/wordpress.org\/documentation\/files\/2026\/05\/query-loop-page-filter-options-291x300.png 291w\" sizes=\"auto, (max-width: 562px) 100vw, 562px\" \/><figcaption class=\"wp-element-caption\">All filter options enabled for pages in the Query Loop<\/figcaption><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Display options<\/h3>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"439\" src=\"https:\/\/wordpress.org\/documentation\/files\/2026\/05\/query-loop-display-options-1024x439.png\" alt=\"Select the three dot menu next to the Display label in the Query Loop block settings to show hidden display options for customizing what posts display.\" class=\"wp-image-16368233\" style=\"aspect-ratio:2.332654949121184;width:455px;height:auto\" srcset=\"https:\/\/wordpress.org\/documentation\/files\/2026\/05\/query-loop-display-options-1024x439.png 1024w, https:\/\/wordpress.org\/documentation\/files\/2026\/05\/query-loop-display-options-300x129.png 300w, https:\/\/wordpress.org\/documentation\/files\/2026\/05\/query-loop-display-options-768x329.png 768w, https:\/\/wordpress.org\/documentation\/files\/2026\/05\/query-loop-display-options.png 1106w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Display options menu (three dots) selected to see all options<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Display options allow you to customize how many posts you want to show in various ways. Some display controls may be hidden by default. To show them, open the Display options menu (three dots) next to the Display label. Select from the following options: <\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Items per Page<\/strong> \u2013 Choose how many posts you want to show within the Query Loop block.<\/li>\n\n\n\n<li><strong>Offset<\/strong> \u2013 Enable the Query Loop block to skip a certain number of WordPress posts before starting output.<\/li>\n\n\n\n<li><strong>Max page to show<\/strong> \u2013 Limits how many pieces of content to show.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">If you don\u2019t see this section, you must change the <a href=\"#query-type\" data-type=\"internal\" data-id=\"#query-type\">Query Type<\/a> to Custom.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Advanced Settings<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The Query Loop provides the following Adavnaced Settings options: HTML Anchor, Additional CSS Class(es), HTML Element, and Reload Full Page.  <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The <strong>Reload Full Page<\/strong> setting is enabled by default. This setting reloads the entire page when visitors move between pages of Query Loop results. This setting is enabled by default and is generally the safest option for predictable navigation and accessibility. When turned off, only the posts inside the Query Loop update instead of reloading the full page.<\/p>\n\n\n\n<p class=\"has-background wp-block-paragraph\" style=\"background-color:#e5f4fa\"><a href=\"https:\/\/wordpress.org\/documentation\/article\/advanced-settings-overview\/\">Learn more about advanced settings<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Demo<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">This video shows how to add a Columns block inside the Post Template to create a repeated layout with the featured post image on the left and post title, date, and excerpt on the right.<\/p>\n\n\n\n<figure class=\"wp-block-video\"><video height=\"1654\" style=\"aspect-ratio: 3020 \/ 1654;\" width=\"3020\" controls src=\"https:\/\/wordpress.org\/documentation\/files\/2026\/05\/query-loop-with-columns-block.mp4\"><\/video><\/figure>\n\n\n\n<div id=\"changelog\" class=\"wp-block-group changelog has-background is-layout-flow wp-block-group-is-layout-flow\" style=\"background-color:#dce5ec\">\n<h2 id=\"changelog\" class=\"wp-block-heading has-medium-font-size\">Changelog<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Updated 2026-05-24 (props to @kjoyner @awetz583 @ntsekouras @mcsf @jasmussen @cagrimmett @<code>bradhogan<\/code> @liviopv @tehjaymo @cuemarie)\n<ul class=\"wp-block-list\">\n<li>Removed italicized content<\/li>\n\n\n\n<li>Updated screenshots and video to reflect WordPress 7.0<\/li>\n\n\n\n<li>Updated &#8220;Anatomy of a Query Loop&#8221; section to be separated by it&#8217;s default options<\/li>\n\n\n\n<li>Updated any screenshots with example layouts that contained low contrast between text and background<\/li>\n\n\n\n<li>Added list of common blocks users may use inside the Query Loop<\/li>\n\n\n\n<li>Added information about excluding categories and tags<\/li>\n\n\n\n<li>Added &#8220;Demo&#8221; section<\/li>\n\n\n\n<li>Added &#8220;Where to find other Query Loop settings&#8221; section<\/li>\n\n\n\n<li>Updated &#8220;Advanced Settings&#8221; section to refer to new parent page<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Updated 2025-07-05\n<ul class=\"wp-block-list\">\n<li>Updated Order by to include new Ascending and Descending order<br>Updated Sticky posts to include new Ignore option<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Updated 2023-03-26\n<ul class=\"wp-block-list\">\n<li>Revised formatting for the whole article<\/li>\n\n\n\n<li>Added videos\/screenshots where applicable&nbsp;<\/li>\n\n\n\n<li>Updated Block Settings Color section<\/li>\n\n\n\n<li>Updated Filters section flow along with new parent filter, multiple author, and custom taxonomies filtering&nbsp;<\/li>\n\n\n\n<li>Updated block creation and replacement flows<\/li>\n\n\n\n<li>Added a mention and a screenshot on customizing what is shown when the Query Loop block shows no results<\/li>\n\n\n\n<li>Added a link to Pagination block<\/li>\n\n\n\n<li>Updated all the screenshots for 6.2<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Added in resources section on 2021-07-14<\/li>\n\n\n\n<li><strong>Created<\/strong> 2021-07-08 <\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Go back to the list of Blocks The Query Loop block is an advanced block that allows you to display posts based on specified parameters, like a PHP loop without the code. You can think of it as a more complex and powerful Latest Posts Block. With various block patterns integrated into the block setup, [&hellip;]<\/p>\n","protected":false},"author":13782018,"featured_media":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false},"category":[80,91],"class_list":["post-14633622","helphub_article","type-helphub_article","status-publish","hentry","category-customization","category-theme-blocks"],"revision_note":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/documentation\/wp-json\/wp\/v2\/articles\/14633622","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/documentation\/wp-json\/wp\/v2\/articles"}],"about":[{"href":"https:\/\/wordpress.org\/documentation\/wp-json\/wp\/v2\/types\/helphub_article"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/documentation\/wp-json\/wp\/v2\/users\/13782018"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/documentation\/wp-json\/wp\/v2\/comments?post=14633622"}],"version-history":[{"count":34,"href":"https:\/\/wordpress.org\/documentation\/wp-json\/wp\/v2\/articles\/14633622\/revisions"}],"predecessor-version":[{"id":16368460,"href":"https:\/\/wordpress.org\/documentation\/wp-json\/wp\/v2\/articles\/14633622\/revisions\/16368460"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/documentation\/wp-json\/wp\/v2\/media?parent=14633622"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wordpress.org\/documentation\/wp-json\/wp\/v2\/category?post=14633622"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}