Last active
May 2, 2019 15:20
-
-
Save Pebblo/337d5f3cdc2180e0ae457ff8485a9573 to your computer and use it in GitHub Desktop.
Example of how to remove the EE filters used to add additional content on archives, this function removes content on the EE category archives.
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
<?php //Please do not include the opening PHP tag if you already have one | |
function tw_ee_remove_details_from_taxonomy() { | |
if( is_tax( 'espresso_event_categories') ) { | |
add_filter ('the_content', 'tw_ee_remove_details_from_taxonomy_content', 100 ); | |
} | |
} | |
add_action( 'template_redirect', 'tw_ee_remove_details_from_taxonomy' ); | |
function tw_ee_remove_details_from_taxonomy_content( $content ) { | |
remove_filter( | |
'the_content', | |
array('EED_Events_Archive', 'event_venues'), | |
EED_Events_Archive::EVENT_VENUES_PRIORITY | |
); | |
remove_filter( | |
'the_content', | |
array('EED_Events_Archive', 'event_datetimes'), | |
EED_Events_Archive::EVENT_DATETIMES_PRIORITY | |
); | |
return $content; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment