Skip to content

Instantly share code, notes, and snippets.

@joshfeck
Created March 28, 2019 17:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joshfeck/6de1d97854c9692ad962be03a5dc47bc to your computer and use it in GitHub Desktop.
Save joshfeck/6de1d97854c9692ad962be03a5dc47bc to your computer and use it in GitHub Desktop.
Remove the standard Event Espresso Events custom post type archive
<?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