Frontend Search Settings -> Categories & Taxonomy Terms
On this option panel, you can choose taxonomy term filters to be displayed on the front-end.
First, use the
Select the taxonomy option to select which taxonomy terms you want to use. For example, if you want post categories, choose the
post - Categories option.
You can select individual items, or the "Use all from ..." option, in which case you can define exclusions for that taxonomy - in case you want to display everything, except some items.
For example, I want to display every category except the Uncategorized:
Change display mode button opens a pop-up window, where you can configure the filters layout.
By default, the taxonomy term filter includes items, that does not have any relation to the taxonomy terms visible in the filter.
If you prefer not showing these items instead, then you can do that by turning off the Show posts/CPM with empty (missing) taxonomy terms? option under the Frontend Search Settings -> Advanced panel.
To better understand the difference, please check the images below.
The term logic option determines how each checkbox is validated agains the results per each taxonomy. By default, all selected terms must match in order for the result to display.
To understand how each possible logics respond, let's consider an example.
We have 3 categories: Actors, Female and Male, and Posts that are associated with each category accordingly. The screenshot below shows the default state, and all of the possible results.
Any of the unchecked checkboxes is treated as an exclusion. Thus unchecking 'Female' will exclude anything categorized as 'Female', and the checked ones must still apply.
This is one of the simplest logic - thus if any of the checked checkboxes match the post, it is considered as a possible result. Unchecked checkboxes are ignored.
Actors + Female yields all results, as Actors match any of them. Same happens with Actors + Male, or even if only Actors is selected.
Female will return all posts categorized as Female, even if Actors is not selected. Same happens with Male.
This is the most strict logic, only recommended when using a small number of categories. In this case, all of the selected terms must match exactly the result terms, no overlapping/subset matches are allowed.
Selecting all categories will yield no results, as none of the results match Actors, Female and Male categories at the same time. Same will happend when choosing Female + Male.
Actors + Female shows anything matching both of the categories (similarly to the default logic). The same is true for Actors + Male.
Choosing Female only, yields the same results.