Skip to content

Instantly share code, notes, and snippets.

@ckpicker
Forked from jazbek/gist:11382578
Created July 9, 2014 17:01
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 ckpicker/e8d0a3fa46fd8c1cd2b8 to your computer and use it in GitHub Desktop.
Save ckpicker/e8d0a3fa46fd8c1cd2b8 to your computer and use it in GitHub Desktop.
<?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