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.
Here is my current code, I don't know how I can put two order-bys in one query...
$recentEpisodes12 = new WP_Query(array(
'posts_per_page' => 12,
'post_type' => 'post',
'meta_key' => 'air_date',
'order' => 'DESC',
'orderby' => 'meta_value_num',
'meta_query' => array(
array(
'key' => 'air_date',
),
array(
'key' => 'already_aired',
'value' => 'yes',
'compare' => '='
)
),
));