Skip to content

Instantly share code, notes, and snippets.

@vicskf
Created July 18, 2017 23:35
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/25dbbbf37566c217bee598b2d44344d5 to your computer and use it in GitHub Desktop.
Save vicskf/25dbbbf37566c217bee598b2d44344d5 to your computer and use it in GitHub Desktop.
TEC Filter Bar > Tribe hide dayofweek options from filter Bar
<?php
/* Tribe hide dayofweek option from filter */
function tribe_modify_category_filter ( $values, $slug ) {
if ( $slug != 'dayofweek' ) return $values;
foreach ( $values as $key => $value ) {
// If Monday, Tuesday or Wednesday then unset the values
if ( $value['value'] == '2' || $value['value'] == '3' || $value['value'] == '4') {
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