Skip to content

Instantly share code, notes, and snippets.

@vicskf
Last active May 11, 2017 01:20
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 vicskf/c37c533e9a9d06633cd5514e192d548a to your computer and use it in GitHub Desktop.
Save vicskf/c37c533e9a9d06633cd5514e192d548a to your computer and use it in GitHub Desktop.
TEC Filter Bar > Tribe hide timeofday option from filter
<?php
/* Tribe hide timeofday option from filter */
function tribe_modify_category_filter ( $values, $slug ) {
if ( $slug != 'timeofday' ) return $values;
foreach ( $values as $key => $value ) {
if ( $value['value'] == '17-21' ) {
unset( $values[$key] );
}
}
return $values;
}
add_filter( 'tribe_events_filter_values', 'tribe_modify_category_filter', 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment