Is there any way to disable the Events post type from having archives?
I’ve tried the following, but it hasn’t worked.
// Remove Events Archive
add_filter( 'register_post_type_args', 'remove_events_archive' , 9999999999999999999, 2 );
function remove_events_archive( $args, $post_type ){
// Do not filter any other post type
if ( 'tribe_events' !== $post_type ) {
// Give other post_types their original arguments
return $args;
}
$args['has_archive'] = false;
// Give the custom-css-js post type it's arguments
return $args;
}
We don’t use the archive page, and lot’s of pages are getting crawled for each day (/event/2016-05-28 etc).