How To Disable Archive Pages In WordPress

Aside from being bad for SEO (due to duplicate content), most websites don’t need content alternately organized by month, author, category and tag.

// Disable All Archives To Remove Duplicate/Improve SEO
// Send any requests back to home page
function redirect_archives( $query ){
if( is_category() || is_tag() || is_date() || is_author() ) {
wp_redirect( home_url() );
add_action( 'parse_query', 'redirect_archives' );

How To Remove Space Above Header In WordPressHow To Create A Simple WordPress Theme From ScratchHow To Add Class Depending On Media Screen SizeHow To Disable Post Revisions In WordPressAdd An Edit Link to WordPress Posts