Aleš Sýkora / November 28, 2023 / 0 comments

Query all posts from category with category__in instead of tax_query in Oxygen Advanced Query builder

Post summary: If you want query some posts from one category, you don’t need to build the tax_query. You can use simpler solution, the category__in parameter. For example, you need to show 3 latest posts from media-mentions category. So go to the administration and find your taxonomy id. Mine is 13 so I will use it like…

If you want query some posts from one category, you don’t need to build the tax_query. You can use simpler solution, the category__in parameter.

For example, you need to show 3 latest posts from media-mentions category. So go to the administration and find your taxonomy id. Mine is 13 so I will use it like this:

How the whole query looks like?

Fuel my passion for writing with a beer🍺

Your support not only makes me drunk but also greatly motivates me to continue creating content that helps. Cheers to more discoveries and shared success. 🍻

0 comments

Share Your Thoughts