-
-
Save Pebblo/0b12585bdb5f85d3f42ca918f655f231 to your computer and use it in GitHub Desktop.
Remove the standard Event Espresso custom post type archive
This file contains hidden or 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, except of course if you're starting with a blank file | |
add_filter( | |
'FHEE__EventEspresso_core_domain_entities_custom_post_types_CustomPostTypeDefinitions__getCustomPostTypes', | |
'tw_ee_remove_event_cpt_archive' | |
); | |
function tw_ee_remove_event_cpt_archive( $cpt_registry_array ) { | |
if ( isset( $cpt_registry_array['espresso_venues'] ) ) { | |
$cpt_registry_array['espresso_venues']['args']['has_archive'] = false; | |
} | |
return $cpt_registry_array; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment