WordPress page title repeated in SOME pages
Posted
by
cmykrgbb
on Pro Webmasters
See other posts from Pro Webmasters
or by cmykrgbb
Published on 2012-11-13T15:52:03Z
Indexed on
2012/11/13
17:18 UTC
Read the original article
Hit count: 417
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!
© Pro Webmasters or respective owner