Created
November 4, 2013 16:40
-
-
Save anonymous/7305387 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$today = date("Y-m-d"); //today's date in MySQL format without the time. Used to compare start date custom field in events. | |
$wp_query = new WP_Query( | |
array( | |
'post_type' => array('tribe_events'), | |
'meta_query' => array( | |
array( | |
'key' => '_EventStartDate', | |
'value' => $today, | |
'compare' => '>=', | |
) | |
), | |
'tax_query' => array( | |
'relation' => 'OR', /*without OR both conditions will be met */ | |
array( | |
'taxonomy' => 'filters', | |
'field' => 'slug', | |
'terms' => $filtersarray | |
), | |
array( | |
'taxonomy' => 'tribe_events_cat', | |
'field' => 'slug', | |
'terms' => $filtersarray | |
), | |
), | |
) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment