wp_query returns match with no criteria

After digging into this for a big, what I discovered by reviewing the actual SQL via $the_query->request was that if no meta value identified it will return true simply because the query eliminates it. The solution was to simply include the the meta as an array and use the “compare” operator.

I have 3 categories, i want to display on a loop the last 3 of every category

If you dont have the same post with more than 1 category, you can do: $args = array( ‘cat’ => $category->term_id, ‘post_type’ => ‘post’, ‘posts_per_page’ => ‘3’, ); $query = new WP_Query( $args ); if ( $query->have_posts() ) { ?> <section class=”<?php echo $category->name; ?> listing”> <h2>Latest in <?php echo $category->name; ?>:</h2> <?php while ( … Read more