Created
March 28, 2019 17:09
-
-
Save joshfeck/6de1d97854c9692ad962be03a5dc47bc to your computer and use it in GitHub Desktop.
Remove the standard Event Espresso Events 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__EE_Register_CPTs__get_CPTs__cpts', | |
'ee_remove_event_cpt_archive' | |
); | |
function ee_remove_event_cpt_archive( $cpt_registry_array ) { | |
if ( isset( $cpt_registry_array['espresso_events'] ) ) { | |
$cpt_registry_array['espresso_events']['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