I'm having a hard time figuring out how to accomplish this (really simple) task:
Get 4 random posts, but only select from the 10 most recent posts.
This works great for the random part, but obviously selects from all the posts:
$query = array(
'posts_per_page' => 4,
'orderby' => 'rand',
'post__not_in' =>array($post->ID)
);
$wp_query = new WP_Query($query);
Basically I want to take the results of one query:
$firstquery = array(
'posts_per_page' => 10,
'orderby' => 'date',
'post__not_in' =>array($post->ID),
'order' => 'DESC'
);
And pass the results into that first one.
Any help would be super appreciated. I've looked at merging them but I think that just give me results from both? Little confused.