Forum Replies Created
-
AuthorPosts
-
KindraParticipant
Thanks Geoff!
Here is the code snippet I’m using – the category is “spa”. Ideally I’d like the spa events to NEVER show up in the main calendar – in any view!
add_action( ‘pre_get_posts’, ‘exclude_events_category’ );
function exclude_events_category( $query ) {
if ( $query->query_vars[‘post_type’] == TribeEvents::POSTTYPE && $query->query_vars[‘eventDisplay’] == ‘photo’ || $query->query_vars[‘eventDisplay’] == ‘past’ && !is_tax(TribeEvents::TAXONOMY) && empty( $query->query_vars[‘suppress_filters’] ) ) {
$query->set( ‘tax_query’, array(
array(
‘taxonomy’ => TribeEvents::TAXONOMY,
‘field’ => ‘slug’,
‘terms’ => array(‘spa’),
‘operator’ => ‘NOT IN’
)
)
);
}
return $query;
}KindraParticipantNo, this is a different issue. I just want the custom fields to appear on
the front end, and they aren’t. Is that not what the rsvp custom fields are
for?KindraParticipantThanks for the quick response George.
ᐧ -
AuthorPosts