Remove Double Titles from WordPress.

remove-double-titles

Generally in the forums i  have come across many complaints about the double title issue in WordPress.

WordPress SEO Yoast – Double title in Google search

WooCommerce – Double title in Google search

And probably some more that i am unaware of.

Be it produced by using SEO YOAST plugin or WooCommerce,  the solution is simple and effective.

Here are the simple steps to follow in order to remove double titles:

1. Open your header.php file

2. locate this : tag starting with <title> and  ending with </title>

it can look pretty much different from theme to theme but usually you will find some code inside like this :

<title>
	<?php $the_title = wp_title('', false);
		if ($the_title != '') :
			echo wp_title('',false),' | '; bloginfo('name');
		else :
			bloginfo('name');
			if ($paged > 1) { echo ' - page '.$paged; } else { if ($blogdesc=get_bloginfo('description')) echo ' - '.$blogdesc; }
		endif; ?>
	</title>

4. Replace everything  between <title> and </title> tags with this SIMPLE code

<title> <?php wp_title(''); ?> </title>

Et voila! You are all done.

Of course first make a copy of your header.php file before you do any changes to it just in case.

Make copy of ALL the files that u EVER modify if i must remind you .  ( just in case )

Remove Double Titles from WordPress. – SOLVED

This snippet is featured at SnippetCentral.Com

Nikola Petrovic
Get in Touch

Nikola Petrovic

Hi there. My name is Nikola,
I speak English, Greek and Serbian.
As a Web Producer i can deal with almost anything web design & development related.
As a freelancer, I charge only a small portion of the money you would pay to agencies to create your website. Affordable web design doesn’t mean that it will lack any of the advanced features of today’s web technology. We just cut out the cost of the middle man.
Feel free to request a free quote using the form on the right or the one bellow.
Nikola Petrovic
Get in Touch