Query Loop – core/query

An advanced block that allows displaying post types based on different query parameters and visual configurations.

Use the Query Loop block to construct a query that will display content from your site in a variety of extendable forms.

Screenshot

Query Loop block screenshot.

Example

  • WordPress


Notes

  • The Query Loop block has several Settings and Filters.
  • Use the Inherit query from URL toggle to control the results being displayed
  • When it’s Disabled ( Off ) then you can construct your own query.
  • The Settings vary depending on the chosen Post Type.
  • Order by: Newest to oldest, Oldest to newest, A to Z, Z to A
  • Filters:
    • Author: choose the author of the posts – All or a particular author.
    • Keyword: Equivalent to search string
  • When the selected Post Type is Post the Settings include Categories and Tags and Sticky posts.
  • Categories and Tags are autocomplete fields.
  • Sticky posts options are: Include, Exclude, Only
  • The Query Loop block uses the Post Template – core/post-template block to display the posts returned.

Variations

Query Loop : Posts List – core/query posts-list
Display a list of your most recent posts, excluding sticky posts.
Query Loop : Title & Date – core/query title-date
An advanced block that allows displaying post types based on different query parameters and visual configurations.
Query Loop : Title & Excerpt – core/query title-excerpt
An advanced block that allows displaying post types based on different query parameters and visual configurations.
Query Loop : Title, Date, & Excerpt – core/query title-date-excerpt
An advanced block that allows displaying post types based on different query parameters and visual configurations.
Query Loop : Image, Date, & Title – core/query image-date-title
An advanced block that allows displaying post types based on different query parameters and visual configurations.
  • Display settingsAdjust the display settings.
  • List viewView as a list.
  • Grid viewDisplay the content in a grid
  • More optionsDisplay more options
    • Show More SettingsShow the block settings in the sidebar.
    • CopyCopy the block to the clipboard.
    • DuplicateUse Duplicate to create a copy of the block.
    • Insert AfterInsert a new block after the selected block(s).
    • Insert BeforeInsert a new block before the selected block(s).
    • Move To Use Move To to move a block. Up/Down or Left/Right
    • Edit as HTMLEdit the HTML of the block.
    • GroupTransform the selected block(s) into a group.
    • Add to Reusable blocksCreate a Reusable block.
    • Remove blockDelete the block.

Query Loop transforms to:

  • Columns
  • Group