Query to get data of a post, if in category?

Your query won’t work as it will simply ignore your taxonomy query. This is not a bug but expected behavior. When using p as your parameter, every other query parameter are ignored/bypassed like for example post_type, tax_query and any taxonomy related queries like category and tag parameters due to the fact that you are directly … Read more