title: Why is WordPress showing query results from an empty post__in array?
body: <p>I have the following <code>WP_Query</code> arguments:</p>
  
  <pre><code>$posts = new WP_Query(array(
          'post__in' =&gt; $postids,
          'meta_key' =&gt;'ratings_average',
          'orderby'=&gt;'meta_value_num',
          'order' =&gt;'DESC',
      ));
  </code></pre>
  
  <p><strong>$postids</strong> is an array of ids which is retrieved from another <code>WP_Query</code>. My problem here is that even if <strong>$postids</strong> is empty, Wordpress loop shows posts. How can I manage this that it shouldn't show any post if <strong>$postids</strong> is empty.</p>