Taxonomies are tools for organizing content in WordPress. Categories and tags are built-in taxonomies, and you can create additional taxonomies. Use the parameters below to query based on taxonomy terms.
The taxonomy you would like to query
The term (or terms) you would like to include
Operator to test. Possible values are ‘IN’, ‘NOT IN’, ‘AND’, ‘EXISTS’ and ‘NOT EXISTS’. Default value is ‘IN’.
Whether to include posts in the subcategories of the categories you’ve specified. Default value is true.
To display posts with either the “blue” or “green” terms in the “color” taxonomy:
[display-posts taxonomy="color" tax_term="blue, green"]
To display posts with both “blue” and “green” terms:
[display-posts taxonomy="color" tax_term="blue, green" tax_operator="AND"]
Multiple taxonomy queries
While most people will only ever need a single taxonomy query, this plugin supports an infinite number of taxonomy queries. Let’s say you wanted to get all posts in category “featured” and also tagged “homepage”. We’ll use a shortcode that looks like this:
[display-posts taxonomy="category" tax_term="featured" taxonomy_2="post_tag" tax_2_term="homepage"]
You can string as many of those as you like, just start the count at 2. In the field listing below, replace (count) with an actual number.
Here’s the available fields:
Which taxonomy to query
Which terms to include (if more than one, separate with commas)
How to query the terms (IN, NOT IN, or AND)
Whether to include posts in the subcategories of the categories you’ve specified.
Describe the relationship between the multiple taxonomy queries (should the results match all the queries or just one of them). Available options: AND and OR