is there any chance to deactivate archives? I can type “?post_type=espresso_events” behind my site like http://mysite.de/?post_type=espresso_events and all events are listed. How can i deactivate this?
function my_remove_ee_cpt_archives() {
if ( is_post_type_archive('espresso_events') ) {
wp_redirect( home_url('/') ); // or any other page
exit;
}
}
add_action( 'pre_get_posts','my_remove_ee_cpt_archives' );
The support post ‘deactivate event archives’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.
Support forum for Event Espresso 3 and Event Espresso 4.