Last active
February 6, 2017 10:03
-
-
Save andrasguseo/c01c096d39c495295efc4cafcffea790 to your computer and use it in GitHub Desktop.
For Chad - show all events of a category, despite the ‘Hide From Event Listings’ being checked
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
<?php | |
$events = tribe_get_events( | |
array( | |
'eventDisplay' => 'list', | |
'posts_per_page' => 3, | |
'tax_query' => array( | |
array( | |
'taxonomy' => 'tribe_events_cat', | |
'field' => 'slug', | |
'terms' => $group_slug, | |
), | |
), | |
'meta_query' => array( | |
'relation' => 'OR', | |
array( | |
'key' => '_EventHideFromUpcoming', | |
'compare' => '=', // "NOT EXIST" might work, though this makes more logical sense to me | |
'value' => 'yes', | |
), | |
array( | |
'key' => '_EventHideFromUpcoming', | |
'compare' => 'NOT EXIST', | |
), | |
), | |
) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment