Mobile app version of vmapp.org
Login or Join
Shelley277

: WordPress page title repeated in SOME pages 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

@Shelley277

Posted in: #Database #Seo #Title #Wordpress

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!

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Shelley277

1 Comments

Sorted by latest first Latest Oldest Best

 

@LarsenBagley505

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

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme