Skip to content

Instantly share code, notes, and snippets.

@andrasguseo
Last active February 6, 2017 10:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrasguseo/c01c096d39c495295efc4cafcffea790 to your computer and use it in GitHub Desktop.
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
<?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