How to Remove the Archives Text From The WordPress Title

How to Remove the Archives Text From The Wordpress Title

So, you’re looking how to remove the Archives text from the WordPress title? First, let’s examine why we would want to do that.

You have been writing content for a while with WordPress and your pages have started to index – great.

As you know, how the title of your webpage appears in Google search results is important for SEO. In this instance I want my SEO Archives page to have a fighting chance to rank for the term SEO (long shot I know). But having the word ‘Archives’ in the title kind of cheapens it’s appearance.

Having the text there does serve a purpose, after all the archives pages do exactly what they say on the tin, it’s a collection of posts grouped by category, author, date, tag, etc.

Archives Text In The WordPress Title

Here’s a few approaches on how to remove the Archives text from the WordPress title.

Method 1: With Yoast Plugin

If you are using the Yoast SEO plugin, you are in luck. Yoast SEO kindly provides the functionality to modify your title tags for all the post types and taxonomies.

  1. First login to your WP Admin.
  2. Then navigate to Search Appearance then Taxonomies. (Taxonomies are Tags and Categories in WordPress)
  3. Now remove the word Archives from the SEO title as seen below.
Yoast SEO - Remove Archives From WordPress Title
Yoast SEO – Remove Archives From WordPress Title

Voila! Next time Google re-crawls your site, your search engine results will be updated to reflect the title change.

Archives Text Not In The WordPress Title

Method 2: Alternative WordPress Plugins

If you don’t have the Yoast plugin. There are other plugins that do the precisely and exclusively the same job.

Archive Title Plugin – This plugin provides options to tweak archive page titles, including removing the annoying archive label.

  • You can modify the category, tag, author, custom post type and custom taxonomy archive title.
  • Remove archive page title label completely
  • Or Hide the archive page title label accessibly (hidden from visibility, but still accessible for assistive devices such as screen readers.)

Method 3: Non Plugin Method

If you don’t want to use a plugin and are comfortable editing your themes source code, the following method will help.

You will need to make a small change to your themes functions.php file.

  • Login to wp-admin > Appearance > Edit Theme
  • Select functions.php

OR

  • Connect to your WordPress site via FTP
  • Navigate to wp-content > themes > Your Theme > functions.php
  • Open functions.php

And add the follow code:

add_filter( 'get_the_archive_title', 'replaceCategoryName');
   function replaceCategoryName ($title) {
   $title =  single_cat_title( '', false );
   return $title;
}

(LAST TESTED: 1/05/2020 – WordPress 5.4)
Source: https://wordpress.stackexchange.com/a/303520

If you are editing the file via FTP be sure to reupload the file to see the changes.

Notes: If you are editing the themes functions.php file, you may want to consider having a child theme. Without a child theme any changes to your functions.php file (like above) could get overwritten if the developers of theme release an update. A child theme ensures that your additional code updates remain.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *