Slowly
The builderBlocks

Filter

Let visitors filter a custom query by your chosen criteria.

The Filter block lets visitors narrow a query on the page, by category, taxonomy, attribute, a search term, or a range slider. The visitor picks a value, and the results update without a page reload.

You build a filter, point it at a query, and place your controls inside it. The controls are ordinary blocks, so their appearance comes from the design panel.

Adding one

  1. Select the section or container that will hold the filter.
  2. Open the inserter and search "filter".
  3. Pick the Filter block.

Once placed, open the filter's settings panel to choose what it filters by and which query it targets.

Settings

In the filter's own panel. The shared design tab (layout, spacing, type, colour, borders, effects) is described at Styling.

SettingWhat it doesReach for it when
TypeWhat kind of filter this is: taxonomy, attribute, search, or rangeSet this first; it determines which other controls appear
SourceWhere the filter options come from: dynamic (from the query's post type) or static (a fixed list you define)Static when options are known in advance and unlikely to change
Data typeThe specific taxonomy or attribute field to filter by, such as category or tagType is set to taxonomy or attribute
Target queryWhich query on the page this filter controls, identified by its query IDYou have more than one query on the page, or the filter sits outside its query's container
Count itemsShows how many results each option would return, next to its labelHelping visitors gauge which options have content before they click
PlaceholderText shown in the filter control before a value is chosenThe control is a select or search input
Show in selectionWhether a chosen option appears as a visible "active filter" tagLetting visitors see and clear what they have picked
Selection prefixText before the option label in the active-filter tagAdding context like "Category:" before the chosen value
Selection suffixText after the option label in the active-filter tagAdding a unit or clarifying label after the value
ParentRestrict options to children of a specific termFiltering a nested taxonomy such as product sub-categories
IncludeLimit which terms appear as optionsShowing only a subset of a taxonomy
ExcludeRemove specific terms from the option listHiding a term like "Uncategorised" that is not useful to visitors
Hide childlessOmit terms that have no child termsFiltering a hierarchical taxonomy where parent terms act as headings only
Hide emptyOmit terms that have no posts matching the current queryKeeping the list to options that will return results
Order byHow options are sorted: name, count, ID, or term orderThe default alphabetical sort is not right for the content
OrderAscending or descendingReversing a count sort to show most-used options first
Dynamic defaultsPre-selected values applied when the page loadsArriving with a filter already active, for a filtered landing page

Styling

The filter wrapper and everything inside it use the shared design panel. Style each child control block separately to set its own colours, spacing, and type. The states panel is where to style active and selected states on filter options.

Accessibility

Each filter control needs a visible label or an accessible name so keyboard and screen-reader users know what they are changing. If the control is a select or checkbox group, associate a label element with it. Avoid filter options that are icon-only with no text equivalent. When results update after a filter change, the query region should carry an appropriate live-region role so assistive technology announces the new count to users who cannot see the page refresh.

On this page