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
Add a Query Loop block to your page
Configure the Post Template section as appropriate to your site. Please see the other documentation resources for details.
Ensure that you are querying the type of posts you want (e.g. Post as opposed to Page)
Click on the “Filters” section of the Query Loop block and choose “Taxonomies”
query loop filtersSelect 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)
Adding and configuring the Query Filter block
The Query Filter block can only be added to the page from within a Query block. The easiest way to do this is to
Select the page outline view
Select “Post Template”
Select “Add before”
You can then type “/” followed by “Query Loop Filter” to find the block
The filter block should then automatically associate itself with the parent Query Loop block
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.
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
default button stylesSmall Royal Blue Pills
small royal blue pillsSmall Cool Grey Pills
small cool grey pills