Created
July 11, 2014 14:40
-
-
Save ckpicker/e98117dd34975140e1b4 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_keep = array( 'testing', 'event' ); | |
if( $slug == 'tags' ) { | |
foreach ( $values as $i => $tag ) { | |
if ( !in_array( $tag['name'], $tags_to_keep ) ) { | |
unset ( $values[$i] ); | |
} | |
} | |
} | |
return $values; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment