Query Loop Filter

Query Loop Filter

Description 

This plugin creates a WordPress Gutenberg block for the Cynder theme that allows visitors to sites to filter posts by taxonomy terms such as categories or tags. Please consult the Aurora Block Editor Training for details on how to use the Gutenberg editor in general. 

This block works with an “opt-in” model together with WordPress’s Query block. The block does not configure itself automatically. Site admins will need to make choices about how the block should be configured. 

The query loop filter block only works with the Core Query Loop block. No other loop blocks, like the “Recent Posts” block, will work with it. The instructions below outline how to use the Core Query Loop block

Usage 

Adding and configuring the Query Loop block 

  1. Add a Query Loop block to your page

image-20260421-140614.png
Adding a query loop in the block editor
  1. Configure the Post Template section as appropriate to your site. Please see the other documentation resources for details.

  2. Ensure that you are querying the type of posts you want (e.g. Post as opposed to Page) 

image-20260421-140854.png
A query for posts rather than pages
  1. Click on the “Filters” section of the Query Loop block and choose “Taxonomies” 
     

    image-20260421-140954.png
    query loop filters
  2. Select taxonomies such as categories for the query. You may choose to use one or more taxonomies either alone or in combination. You must opt-in to have the display to visitors (see below) 

image-20260421-141130.png
adding category taxonomies

 

Adding and configuring the Query Filter block 

  1. The Query Filter block can only be added to the page from within a Query block. The easiest way to do this is to 

    1. Select the page outline view

    2. Select “Post Template” 

    3. Select “Add before” 

image-20260421-141424.png
add before the Post Template block within the Query Loop block

You can then type “/” followed by “Query Loop Filter” to find the block 

image-20260421-141644.png
searching for the Query Loop Filter block
  1. The filter block should then automatically associate itself with the parent Query Loop block 

  2. You may now configure which of the taxonomies visitors will be presented with to filter by. Any taxonomies which the site admin has not included in the parent Query Loop will be visible but not available for selection. 

image-20260421-141850.png
adding Categories as filters

You may also choose to show or hide the “Reset” button and its text. By default the button is enabled. 

Block Styles 

On Aurora, there are currently three styles available. They are  

  • Default Aurora Buttons 
     

    image-20260421-142028.png
    default button styles
  • Small Royal Blue Pills 
     

    image-20260421-142050.png
    small royal blue pills
  • Small Cool Grey Pills 
     
     

    image-20260421-142111.png
    small cool grey pills