To filter posts by taxonomies, do the following:
Step 1: Adding a taxonomy
- Edit a map
- Open the widget “List & filter Settings”
- Click on the menu “Search filter settings”
- Scroll to the section “Taxonomies parameters”
- Open the group field “Taxonomy 1” (or click on the button “Add new taxonomy” if this is not the first time to add one)
Step 2: Setting up the taxonomy parameters
- In the field “Label/Title”, enter the title of your taxonomy (the title that’ll appear in the filter form! e.g. “Category”)
- In the field “Taxonomy name”, select a taxonomy (e.g. “category”).
- In the field “Description”, enter a description of your taxonomy. The description will appear in the filter form!
- Choose the display type of your taxonomy by selecting an option in the field “Display type”.
- (Optional) In the field “Exclude terms”, Select the terms that you want to exclude from the filter.
- (Optional) In the field “Include terms”, Select the terms that you want to include in the filter. By default, the plugin will get all the terms!
- In the field “”Operator” parameter”, choose the operator to test with when filtering the posts.
- In the fields “Orderby parameter” and “Order parameter”, choose the display order of the taxonomy terms. For example, if you use a taxonomy to save the post’s category and that you want to display all available categories in the filter form as a checkbox list, the plugin will automatically get all the terms saved inside the database and will display them according to that “orderby” and “order” parameters.
- In the field “Hide empty terms”, choose whether to hide or show the terms that are not assigned to any post.
- In the field “”Search All” Option”, choose whether you want to add an option that allows the users to select all the terms by a one click. When set to “Yes”, you may need to change the text/label to use for this option in the field “”Search All” Label”.
- To add a symbol/text next to the taxonomy terms, type it in the field “Symbol”, and choose its display position in the field “Symbol position”.
- To show the number of posts assigned to each term, select the option “Yes” in the field “Show count”. This option will help the users to know if they may get any result before filtering the posts!
- In the field “Display status”, choose whether to open or close the taxonomy container on page load.
- In the field “Visibility”, choose whether to show or hide the taxonomy in the filter form. This option is useful in case you want to temporarily hide the taxonomy field without having to delete it!
- To add a new taxonomy, click on the button “Add new taxonomy” and repeat the above steps. Please note that you cannot use the same taxonomy multiple times in the same filter!
Step 3: Defining the relationship between all your taxonomies
Under the button “Add new taxonomy”, in the field “”Relation” parameter”, select the parameter that defines the relationship between all your taxonomies. For example, let’s say you have two taxonomies, each with different terms:
- Category:
- Colored
- Not colored
- Color:
- Red
- Blue
- Yellow
Let’s also imagine a situation where a user wants to filter the posts by the category “Colored” and the color “Red”:
-
- By selecting the relation parameter “AND”, the plugin will try to get all posts with the category term “Colored” and the color term “red”. Note that a post must have these two terms in order to be displayed!
- By selecting the relation parameter “OR”, the plugin will try to get all posts with the category term “Colored” or with the color term “Red”. Note that a post must have only one of these two terms in order to be displayed!
In the same context
- Activate the search filter
- Display the search filter in left side or the right side of the list
- Show or hide the search filter on page load
- Display the buttons “Filter” & “Rest” on top and/or the bottom of the search filter form
- Change the display order of the fields in the search filter form
- Filter posts based on a keyword
- Filter posts by publish date
- Filter posts by custom fields
- Change the text displayed in the button “Filter”