The result of the query so far is the print of the array, Array ( [0] => 309 [1] => 10 ), 309 & 10 are the correct id's of the posts I want to display, and "No posts were found" the result of hitting "else".
I have a pastebin with the most up to date copy of my code here, http://pastebin.com/pZkQCf9y
Here is the query:
<?php
$ongoing_args = array(
'post_type' => 'promotions',
'meta_key' => 'sp_ongoingPromotion',
'meta_value' => 1
);
$current_args = array(
'post_type' => 'promotions',
'meta_key' => 'sp_endDate',
'meta_value' => date("Y/m/d"),
'meta_compare' => '>=',
'orderby' => 'meta_value',
'order' => 'ASC'
);
// Get promotions using the arguments outlined above.
$ongoing_promotions = get_posts( $ongoing_args );
$current_promotions = get_posts( $current_args );
// Merge arrays
$all_promotions = array_merge( $ongoing_promotions, $current_promotions );
// Get just the ID of promotions
$promotion_ids = wp_list_pluck( $all_promotions, 'ID' );
print_r($promotion_ids);
// Do a new query with these IDs to get a properly-sorted list of promotions
$args = array(
'post__in' => $promotion_ids,
'numberposts' => 5,
'post_status' => 'publish'
);
$wp_query= null;
$wp_query = new WP_Query();
$wp_query->query( $args );
$wp_query = new WP_Query($args);
if($wp_query->have_posts()){
while($wp_query->have_posts()){
$wp_query->the_post();
?>
Any help greatly appreciated.