One of my clients asked me how he could remove the word archive from category & tags title. Then I share the whole process with him and wished to share this also with you. Because It’s very relevant to WordPress and SEO. You can not ignore SEO for your eCommerce Business website.
Well, if you are not familiar with WordPress and archive functionality built into it. Then this article will definitely resolve all your queries.
The WordPress file system has a file called archive.php in its theme folder, and every WordPress theme has it.
Basically, this file lists all the posts with or without specific categories.
Sometimes Google indexes this page as it has several links to different posts and it doesnât look good in search results as the word âArchiveâ is present.
Steps to remove the word Archive from Category & Tags
So, there are 2 different ways to remove the word from the category title and tag title.
1.  Yoast SEO â The Easy Way
Yoast SEO provides this functionality to modify any title tags for any post type and taxonomies. Taxonomies are Tags and categories in WordPress. So to remove the word you need to do the following:
- Login to your wp-admin
- Goto SEO (Yoast SEO)
- Titles & Metas and click on Taxonomies tab.
Then Remove the word âArchiveâ
https://youtu.be/c9_msApYvfI
2.  Code â The Hard Way
Now if you are familiar with the WordPress hierarchy and also with coding in PHP, then this solution might help you.
If your theme comes with a child theme, I would always recommend you to use and edit the child theme rather than the primary theme, but if your theme doesnât come with a child theme, then itâs not a problem.
Here are the steps that will help you achieve that:-
- Connect & Establish FTP connection with your WordPress.
- Navigate to wp-content > themes > Your Current Theme.
- Search for âcategory.php and âarchive.phpâ.
- Click edit on both of them.
- Now search for âarchive-titleâ and find the word âArchiveâ and remove it.
This above step will remove the word âArchiveâ from the category title and tag title. but in case you couldnât find that word for any reason, you have the method-2.
- Connect & Establish FTP connection with your WordPress.
- Navigate to wp-content > themes > Your Current Theme. > functions.php
- OR
- Login to wp-admin > Appearance > Edit Theme
- Select functions.php
- and paste the following code
add_filter( 'get_the_archive_title', function ($title) {
if ( is_category() ) {
$title = single_cat_title( '', false );
} elseif ( is_tag() ) {
$title = single_tag_title( '', false );
} elseif ( is_author() ) {
$title = '<span class="vcard">' . get_the_author() . '</span>' ;
}
return $title;
});