Skip to content

Instantly share code, notes, and snippets.

@jazbek
Last active August 29, 2015 14:00
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jazbek/11382578 to your computer and use it in GitHub Desktop.
Save jazbek/11382578 to your computer and use it in GitHub Desktop.
Filter a category out of the filter bar options
<?php
add_filter( 'tribe_events_filter_values', 'tribe_filter_event_categories', 10, 2 );
function tribe_filter_event_categories( $values, $slug ) {
if ( $slug == 'eventcategory' ) {
foreach ( $values as $i => $category ) {
if ( $category['name'] == 'Event Category 1' ) {
unset ( $values[$i] );
break;
}
}
}
return $values;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment