title: How to order by two different things at once in a query in WordPress
body: <p>I am having a little problem. I am trying to get the latest 12 post by a custom meta field. Out of those 12 posts, I want to order them by post date. So first I pull 12 posts out using a custom meta field and ordering them to find the latest through the meta field. Once I have them, then I want to re-order them with latest post. </p>
  
  <p>Here is my current code, I don't know how I can put two order-bys in one query...</p>
  
  <pre><code>$recentEpisodes12 = new WP_Query(array(
      'posts_per_page' =&gt; 12,
      'post_type' =&gt; 'post',
      'meta_key' =&gt; 'air_date',
      'order' =&gt; 'DESC',
      'orderby' =&gt; 'meta_value_num',
      'meta_query' =&gt; array(
          array(
              'key' =&gt; 'air_date',
          ),
          array(
              'key' =&gt; 'already_aired',
              'value' =&gt; 'yes',
              'compare' =&gt; '='
          )
      ),
  
  )); 
  </code></pre>