1

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!

1 Answer 1

1

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

2
  • 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
    Commented Nov 13, 2012 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
    Commented Nov 13, 2012 at 16:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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