Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.