How to Remove Word “Category” From Title of Category Page

Hello guys, today I found a solution to something I have been trying to figure out in my blog for months now but I always failed. Buy today, voila! I got managed to get rid of that word category from the title of my pages.

So we will get just a little bit technical. For those who use WordPress and are doing all the design by themselves, sometimes it takes longer than you expected to figure out small things.

I have never liked it when the word category appears before the actual page title in my blog but for a long time I have been struggling to find ways of doing away with it. But guess what, today after thorough research and reading I came across a Javascript code that enable me solve the problem.

The snippet below illustrates what I have just explained in the previous paragraphs.

I’m going to explain how to do that in steps but this only applies to those using WordPress as their Content Management System (CMS). For those using other CMS, the process maybe a little bit different.

  • Install a plugin called ‘Code Snippets’, there are other plugins you can use but I’ll just talk about this one because it’s the one I used. Activate the plugin, mine appears as active because I already activated.
  • You’ll now have the ‘Code Snippets’ tab in your WordPress admin window as highlighted below.
  • Head on and click on Snippets-settings and the window below appears
  • Because I’m going to use the Javascript code below, I’ll ‘edit’ the Javascript code as highlighted below and I’ll be directed to the code editor window as illustrated below.

You will be directed to the code editor window where you’ll add the following code.

function ultra_archive_title( $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;
}
add_filter( 'get_the_archive_title', 'ultra_archive_title' );

  • Below is the window where you paste the above code.

  • Once you paste click on ‘Save Changes and Activate’

Now see how the page title appears, the word ‘Category’ is no longer visible. This is important because it’s not necessary for the readers to see the word Category before the actual title of the page. Besides, the page looks neat now and uncluttered.

Posts created 41

Share your comments:

Begin typing your search term above and press enter to search. Press ESC to cancel.