New in 4.7: more post filtering options based on taxonomy and term

In 4.7 we will extend the filtering options to help you narrow the range of possible posts based on their taxonomies and terms.

Customize term shortcode – test 4.7

The first and least important change is how we name the “Anything may match” option. Prior to 4.7 it was named “Any”, and no one every asked if “Any” means that there have to be at least one term of that taxonomy associated with the post, but technically, “Any” meant that there will be no filtering at all done based on that taxonomy and therefor we decided to change its name to “Ignore” which better represent what is actually happening.

Actual additional filtering options are:

  • Exclude child term: By default, when filtering by a hierarchical taxonomies (like categories), the posts being displayed would be of the term being selected and any of it sub/child terms. This option will let you decide if you want those sub/child terms result or not.
  • Content must be associated with: By default, when filtering is done by several terms it is enough for the post to be associated with any of them. This option lets you specify other criteria as well:
    • Any of the terms: An explicit option for the previously default behaviour
    • All the terms: To match, a post must be associated with all of the terms
    • None of the terms: Only posts which are not associated with any of the terms will match. This is useful when you want to exclude posts of specific term (for example one which used to drive a slider)
  • All taxonomies not being ignored, have to match: Before 4.7 it was enough for a post to match any of the taxonomy based filtering. For example if you had filtering rule that involved both categories and tags, it was enough for the post to be associated with the correct categories, but didn’t had to be associated with the correct tag, and vice versa. This option lets you specify a different behaviour in which all taxonomy filters have to match in order for a post to match the filter.

Leave a Reply

Your email address will not be published. Required fields are marked *