How to Disable Tag Archives Pages in WordPress Site?

Tag Archives are pages that store a list of posts on a particular tags. There are a lot of user who use tag’s archive instead of category. Perhaps some people want to disable tag archives page because they prefer category instead of tags.

This tutorial will show you how to disable these Tag Archives pages in WordPress.

Login to your Cpanel or FTP server first. Then go to your active Theme directory. Search for function.php file inside the directory. Open this function.php file via editor and paste the following code. 

				
					// Remove tag archives
add_action('template_redirect', 'jltwp_adminify_remove_archives_tag');
function _remove_archives_tag()
{
    if (is_tag()){
        $target = get_option('siteurl');
        $status = '301';
        wp_redirect($target, 301);
        die();        
    }
}
				
			

That’s all about manual coding method. There is another way to fix the issue. If you install “WP Adminify” plugin inside your WordPress site, you can disable tag archives page using a single click. 

After WP Adminify installation, navigate to WP Adminify > tweaks > Post / Archives. Search for “Disable Tag Archives” option and enable it.

disable tag archives in WordPress

Now you can test your tag archive page to see the output.

Was this article helpful?

© 2021 - Adminify | All rights reserved

WP Adminfy accepted payment methods