How to Remove Double Titles from WordPress.

Home » Old posts » How to Remove Double Titles from WordPress.

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 fivera Petrovic
Get in Touch

Nikola fivera 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.

Web Design Skills

I have been into web design for the last 10+ years.
After working for various agencies and companies I have decided to take a lone wolf path as a Freelancer but I still actively collaborate with agencies across the globe.
I enjoy building websites on WordPress platform but i can work on any other platforms as well.

SEO Skills

I have spent a last couple of years as an SEO executive and SEO consultant working on 4 continents.
Specialized in on-page SEO I wear a pointy Google-Wizard White-Hat and help various small and medium-sized businesses rank well in the search engines.
I enjoy working with Google and Yahoo SE.
Feel free to request a free meeting bellow.
As a freelancer, I charge only a small portion of the money you would pay to agencies to get your project done.
Nikola fivera Petrovic
Get in Touch
2017-04-16T04:15:41+00:00

Leave a Reply

6 Comments on "How to Remove Double Titles from WordPress."

Notify of
avatar
Sort by:   newest | oldest | most voted
thyson
Guest

Nice tip, sorted the issue out nicely – thanks very much!

Asha Fahnestock
Guest
Hello! I am sure it’s to some degree off-topic even so had to reluctantly ask. Does doing a well-established site for instance your website have a great deal of deliver the results? I’m brand new for you to writing a blog nevertheless actually do publish at my diary everyday. I’d choose to go into website to distribute my expertise as well as emotions web based. Remember to conscious in case you have any type of… Read more »
Lori Eldridge
Guest

This cleared up a double title issue I was trying to solve. Thanks!

Kamil “TheJungle” Zabiegała
Guest
Kamil “TheJungle” Zabiegała

Didn’t work.

fivera
Guest

This code is working. Make sure to clear your cache after the changes.

wpDiscuz