Guides/Edit your website/Templates/Choose the content shown in the Query Loop block

Choose the content shown in the Query Loop block

The Query Loop block is used to display blog posts (or other content types such as pages, testimonials, or projects) on your website in different visual layouts. This guide will show you how to control which content is displayed in the Query Loop block.

Video tutorial

Slow down or speed up the video using the controls in the lower-right corner after clicking Play

Adjust the criteria of the Query Loop

In the Query Loop block settings, you can adjust which posts (or pages, projects, or other content types) are shown and in what order.

  1. In your site’s dashboard, navigate to Appearance → Editor.
  2. Select the template you want to edit, or click on the site preview to edit the homepage.
  3. Open List View and select the Query Loop block.
  4. View the block settings in the right sidebar. If you do not see the sidebar, you may need to click the Settings icon in the top-right corner to bring up the settings. This icon looks like a square with two uneven columns:
The settings icon in the Editor with a tooltip "Settings" below it.
Click the Settings icon to open the block settings
  1. Change the “Query Type” to “Custom” to start adjusting the way the posts are displayed.
    • Note: If you have added the Query Loop to a regular page or post (and not a template) you will not see the toggle for Query Type. The following settings will appear by default.
  2. Choose from the following settings:
    • Post type: Select the type of content to display, choosing from posts, pages, testimonials, or projects. Other types of content can be displayed here by plugins, such as products via WooCommerce, for example.
    • Order by: Organize content by date or alphabetically.
    • Sticky Posts: Choose what happens with sticky posts:
      • Include: Sticky posts will be included in the list.
      • Exclude: Sticky posts will not be shown in the list.
      • Ignore: Sticky posts will be included, but not considered sticky.
      • Show only: Only sticky posts will be shown.
  3. Choose from the following display settings (if any option is missing, click on the three dots () next to the Display settings label, and select the setting from the menu):
    • Items per page: Choose how many posts are shown on the page, up to a maximum of 100 posts per page. Use this setting to increase or decrease the number of posts on the page.
    • Offset: Begin from the first post (0) or skip the first X number of posts.
    • Max pages to show: If pagination is used, this option specifies the maximum number of pages that can be viewed in total.
  4. Using filters, you can narrow down the content displayed using specific criteria:
    • Taxonomies (i.e., categories and tags)
    • Authors
    • Keyword
    • Additional filters may be added via plugins (such as product categories via WooCommerce, for example).
  5. Click the “Save” button to save your changes.
Query Loop Block Settings with a custom query type selected.
Query Type with Custom selected
Query Loop Block Display Settings.
Display settings
The Filters setting shows boxes to narrow down posts by categories, tags, authors, and keyword.
Filter settings

Was this guide helpful for you?

Not quite what you're looking for? Get Help!

Copied to clipboard!