Created
July 9, 2014 16:13
-
-
Save ckpicker/2f07cdfb455c8e416702 to your computer and use it in GitHub Desktop.
Filter Bar 3.6 // Remove Specific Tags from Filter Bar
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'tribe_events_filter_values', 'display_only_event_tags', 10, 2); | |
function display_only_event_tags( $values, $slug ) { | |
$tags_to_remove = array( 'testing', 'event' ); | |
if( $slug == 'tags' ) { | |
foreach ( $values as $i => $tag ) { | |
if ( in_array( $tag['name'], $tags_to_remove ) ) { | |
unset ( $values[$i] ); | |
} | |
} | |
} | |
return $values; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment