title: get posts by id in wordpress
body: <p>I want to get posts by id. Id's are in array. I am using this code but now working.</p>
  
  <pre><code>$the_query = new WP_Query( array( 
      'post_type' =&gt; 'job_listing', 
      'post__in' =&gt; array( 311, 312 ) 
  ));
  
  print_r($the_query); //this doesn't print any data
  
  if ( $the_query-&gt;have_posts() ) {
      echo '&lt;ul&gt;';
      while ( $the_query-&gt;have_posts() ) {
          $the_query-&gt;the_post();
          echo '&lt;li&gt;' . get_the_title() . '&lt;/li&gt;';
      }
      echo '&lt;/ul&gt;';
  }
  </code></pre>