List posts that match ALL categories or tags

Display Posts includes many query parameters for determining which posts are shown. If you use the category or category_id parameters and include multiple categories, it will find posts that have any of those categories.

If you would like to list only posts that have all of those categories, you can use the taxonomy query parameters.

[display-posts taxonomy="category" tax_term="blue, green" tax_operator="AND"]

Match all tags

The same applies to the “tag” taxonomy. If you use the tag parameter and specify multiple tags, it will find posts with any of those tags.

Use a taxonomy query to get posts with all these tags:

[display-posts taxonomy="post_tag" tax_term="blue, green" tax_operator="AND"]

Published by Bill Erickson

Bill Erickson is a freelance WordPress developer and a contributor to the Genesis framework. For the past 14 years he has worked with attorneys, publishers, corporations, and non-profits, building custom websites tailored to their needs and goals.