How to Remove WordPress Archives

Remove WordPress Archives

WordPress creates a lot of extra pages – archives. For visitors, this is additional navigation, which makes it possible to better navigate the site. But search engines regard such pages as duplicates. This can lead to a downgrade. Therefore, you need to get rid of them. Let’s look at simple ways to remove WordPress archives.

What is an archives page?

The published record is also placed on other pages – in the archives. This is a regular list of posts sorted by:

  • date of publication (by month or by year),
  • auto RU,
  • category (heading),
  • tag (if added).

How to remove archives of categories, poets, authors, dates

Let’s analyze working methods: using plugins and adding code. Choose the one that is convenient for you.

Yoast SEO

This is the most popular SEO solution for WP sites that allows you to get rid of date and author archives.

If the plugin is activated, go to SEO > Show in SERP, go to the Archives tab and enable the options you want.

smart Archive Page Remove

This is a separate plugin for deleting archives.

  1. Install and activate.
  2. Go to Settings > Archive Pages and enable the options you want.

ClearfyPro

Clearfy Pro is a multifunctional premium WP plugin for optimization and acceleration. If it is installed, then everything will be done by itself. For this:

  • Open Clearfy Pro,
  • Go to the duplicates tab,
  • Enable the first 3 options,
  • Save your changes.

Also see: How to Password Protect WordPress Uploads

Code in functions.php

This method is great if you don’t want to install additional modules.

Just paste a few lines at the very end of this file.

add_action( 'parse_query', function ( $query ) {
if( is_date() || is_category() || is_tag() || is_author() ) {
wp_redirect( home_url() );
exit;
}
});

The code checks for the presence of archive pages by:

  • is_date()- date,
    is_category()- categories,
    is_tag()- tegu,
    is_author()- according to the author.

You can remove unnecessary checks.

Leave a comment

Your email address will not be published.