$todayDate = date('m/d/Y');
$futureDate = strtotime ( '+7 days' , strtotime ( $todayDate ) ) ;
$futureDate = date ( 'm/d/Y' , $futureDate );
$args = array(
'post_type' => 'events',
'post_status' => 'publish',
'posts_per_page' => -1,
'event_category' => 'events',
'meta_query' => array(
array(
'key' => 'event_date',
'compare' => '>=',
'value' => $futureDate,
)
),
'meta_key' => 'event_date',
'orderby' => 'meta_value',
'order' => 'ASC',
);
I want to show the upcoming events for the next week or next month. I have this args array set but still giving me the post of yesterday's and not sorted as how i wanted. Also, how to get rid of yesterday's post in my query..