WP_Query showing all posts, except from category X, unless it’s also in Y
In your wp_query, you should use NOT IN which I don’t see. In your arguments for WP_Query(), you should use category__not_in instead of cat. So, change your code to: Excluding Single Category $args = array( ‘post_type’ => ‘post’, ‘posts_per_page’ => 15, ‘paged’ => $paged, ‘category__not_in’ => ‘X’, // string ); If you wish to exclude … Read more