I wrote a plugin for this -- that needs some updating, but it should still work fine.
Essentially you hook in some place late after WordPress knows what page is requested (like template_redirect
), use one of the conditional functions and either use $wp_query->set_404()
or just redirect the user to a page of your choice.
To disable categories, tags, for instanceauthor and date archives:
<?php
add_action('template_redirect', 'wpse69948_tag_disabler');
function wpse69948_tag_disabler()
{
if(is_tag() || is_category() || is_date() || is_author())
{
global $wp_query;
$wp_query->set_404();
}
}