Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I have created a Wordpress site and titles were working just fine. Then, some time and plugins installed later, I noticed that in SOME pages I get the title repeated 2 times.

Example of wrong page title: Contact - NAME | NAME

Example of normal title: Our Services | NAME

Now, if I go to General Settings and change title it will change both, no improvement. SEO by Yoast has the option to reset page titles, but that just removes all titles leaving the current URL as page title, so no good either.

Here is the code I originally had: <title><?php wp_title(''); ?><?php if(wp_title('', false)) { echo ' | '; } ?><?php bloginfo('name'); ?></title>

Here is the code I am using now: <title><?php wp_title('|'); ?></title>

To sum up, I think somewhere in the database there's a wp_title repeated: once using '-' as separator, another one (the current one) using '|'.

Any help will be most appreciated, thanks!

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

I'm guessing it's an SEO plugin. If you're using Yoast SEO which lets you control each page and posts meta tags you should remove the website name from the WordPress options page under General you may have an entry in Site Title. If so the plugin may be adding this to each pages title causing the duplicates. Remove it from this area and go with Yoast SEO to manage your meta tags.

You can also search your template files for the string wp_title(' and find where it may be duplicated. This is a WordPress function it's not stored in the database. It's in the template files

share|improve this answer
    
In fact it was Yoast's plugin duplicating the title yes. This solved my doubts, now I'll see how I can handle this to make it right. Thank you Anagio –  cmykrgbb Nov 13 '12 at 16:34
    
Search your plugins make sure all they have is <title><?php wp_title(''); ?></title> set in them so Yoast will work properly. You may want to create a child theme if you have to modify your theme. –  Anagio Nov 13 '12 at 16:35
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.