WP Query for Multiple Post Types

I am trying to splice together 2 post types and pull in 8 posts/events greater than the current day. I am struggling to get the default post type posts to show up though. Right now only the events are showing up – and I think it is something to do with my meta_query. The code is below:

global $post;
$today = date( ‘Ymd’ );
$args = array(
‘post_type’ => array(‘post’, ‘tribe_events’),
‘post_status’ => ‘publish’,
‘posts_per_page’ => 8,
‘meta_query’ => array(
‘relation’ => ‘OR’,
‘event_date’ => array(
‘key’ => ‘_EventStartDate’,
‘compare’ => ‘>=’,
‘value’ => $today,
),
‘date’ => array(
‘key’ => ‘date’,
‘compare’ => ‘>=’,
‘value’ => $today,
)
),
‘orderby’ => array( ‘event_date’ => ‘ASC’, ‘date’ => ‘ASC’ ),
);

Any help would be greatly appreciated.

Read more here:: WP Query for Multiple Post Types

Leave a Reply

Your email address will not be published. Required fields are marked *