Print this Post

Fix: “WordPress SEO by Yoast” prints site title twice

If you are using “WordPress SEO by Yoast” plugin, then you may have noticed that it prints the site name two times in page title. For example, if the site name is MY BLOG, then it prints “post title – MY BLOG – MY BLOG“. This is a common issue in hard coded themes. They do not simply cooperate with the plugin. This can be fixed by replacing title generator code in your theme’s header.php file with <?php wp_title(''); ?>

First, go to WordPress SEO titles settings and uncheck Force rewrite titles. Then open up header.php file of your theme and search for <title>. Then replace whole <title>some code</title> with <title><?php wp_title(''); ?></title> and update file. This should fix your problem. Now go back to your site and make sure that site name in title is displaying only once. I faced the same problem, and fixed it by doing the above hack.


Fixing this issue in Graphene Theme is even easier. Go to Graphene Options –> Display –> Miscellaneous Display Options –> Site title options and just put #post-title in Custom content pages site title.

If you are comfortable with child theme and php, you may add this function to graphene child theme’s functions.php file.

function my_remove_filter(){
   remove_filter( 'wp_title', 'graphene_title' );
add_action( 'init', 'my_remove_filter' );

This disables Graphene theme’s ability to modify post titles. This is a much better solution.

Short Link:

About the author

Prasanna SP

Student | WordPress Dev | Tech Blogger | Interested in GNU/Linux, FOSS, PHP, Drupal, WordPress, Ethical hacking, Photography, Painting, Literature etc..

Permanent link to this article: http://www.prasannasp.net/fix-seo-by-yoast-prints-site-title-twice/


2 pings

Skip to comment form

  1. leonor

    Hi, I did this but it didn’t fix…i still have the title doubled…

    can you help?

    1. Prasanna SP

      Hi eonor, which theme you’re using in your site?

  2. nautilus7

    This doesn’t work here too. Graphene theme v1.6 and v1.1.5 of the seo plugin.

    1. Prasanna SP

      Yeah, it was working earlier, but now Graphene theme itself is using <title><?php wp_title(''); ?></title> for the title. I don’t know what went wrong after the 1.6 update!

    2. Prasanna SP

      Hi nautilus7,
      I’ve fixed this issue by another way. I changed the Custom content pages site title (Graphene Display Options –> Miscellaneous Display Options –> Site title options) to #post-title » Blog. So, it shows page title as “Post Titile – Prasanna SP » Blog”. It is much better than having double site name. I hope this could help you too.

  3. Tanya Demjanec

    Hello Prasanna.

    Came across your site today searching for a solution.

    Now I think you may have a theory!

    Do you think you may know why it is, that when I click on the RSS icon in the top of my site, it directs me to Add to Google page (which is fine), but the NAME of the feed is

    Car Wash AtlantaCar Wash Atlanta »
    Kirkwood Car Wash, Atlanta’s Self-Service Car Wash

    Where “Car Wash Atlanta” is obviously listed twice. Not neatly, I might add.

    Any thought on how I could remedy this? Within which file is that title being written? I don’t really want to make any global changes that will affect other page/post titles.

    It’s showing up strangely in search results and it’s bugging me!

    I’m using Graphene theme, which overall I like very much.

    Thank you in advance and best to you,


    1. Prasanna SP

      Hi Tanya, to fix the feed title issue, replace the contents of /graphene/includes/theme-head.php with this updated one – http://graphene.googlecode.com/svn/branches/1.6/includes/theme-head.php

      Else, you can wait for the Graphene 1.6.1 maintenance release. It has the fixes for known bugs.

      Thank you for visiting my site!

      1. Tanya Demjanec


        I downloaded the new file and replaced the old theme-head.php.
        That did the trick of removing the double title smushed together — but it then appeared without any title at all!

        I couldn’t figure out how to modify the original theme-head.php, but this version seemed quite clear.

        I swapped out a line for the title so that it shows up PERFECTLY!

        	if ( is_feed() ){
        		/**$title = $default_title;*/
        		$title = $graphene_settings['custom_site_title_frontpage'];

        Thanks again. Looking forward to your next post!



        PS to nautilus7: Thanks for chiming in, but I was solely concerned with the way the title appeared for the feed page. Everything else I had working just as I like and I didn’t want to alter that.

  4. akhil

    Thnks man….you helped me

    1. Prasanna SP

      Thanks for the comment Akhil.

  5. Bryan Rego

    Thanks friend.. i had the problem on my sites techspins.com and mbascholar.com…. thaanks for the write up. i could not figure it out. Great tip friend.

    1. Prasanna SP

      Thanks Bryan!

  6. Chris

    I am having this same problem. I have Thesis 1.82 theme but the header.php file that I edited the title on is from my root wordpress directory because in the thesis themes header.php there’s only a couple of lines.

    Did I edit the right file ? Because it still appends the site name twice after my post name… 🙁

    1. Prasanna SP

      Hi Chris, I haven’t seen the structure of Thesis theme. So, I don’t know where the title is coming from. If it it not there in header.php (in root) look for the header files in /includes.

      1. Chris

        I have fixed it, turns out there is an option in the thesis settings to append the site name to page titles which I had switched on!

  7. Christian

    Thank you my friend for your excellent information. It has been very useful for me in different articles.
    I have a problem with the Double Titles being generated using the SEO plugin. I am using the Graphene theme and I already have the “title” as it should be in my header.php.

    Although I still have the problem. I wonder if I need to change something else in the graphene settings???

  8. Mark

    Hi, I don’t have double titles in my site’s title… but in my RSS. I disables all SEO option of the theme, only active SEO plugin is Yoast… and I still can’t figure out where the problem is exactly coming from. 🙁
    Do you have any idea?

    1. Prasanna SP

      This issue is fixed in the latest version of Graphene theme. Please update yours.

  9. Rajesh Kumar

    Hi Prasanna,

    Iam using WP Clear theme and facing problem like post title – sitename : sitename. how to fix this problem??

    1. Prasanna SP

      There may be an option to change the title structure in your theme options. Look for it, if there is no, then try the above hack.

  10. vijay

    Hey,you helped me to fix this issue.thanks alot

    1. Prasanna SP

      You are welcome Vijay!

  11. simran

    hey i just followed your steps but didn’t find it useful as i share my content on google+ its still showing doule title here are attchments for better vision:
    After activating plugin and modifying header:

    Before activating:

  12. Satish

    Thank you very very very very very very very very very very very very much 😀

    Actually first i copied what you mentioned above 🙂 But later i saw that the same code was shown in post title as a code.. Later again i released that i there are no proper spaces in the code. so copied and resolved my problem with yoast 😀

    so its not
    in the first para. Its
    without space and all

    any how thanks for the tip mate 😀

    1. Prasanna SP

      Thanks for the notification Satish! I’ve removed the space from wp_title code and updated the post.

      1. Satish

        Cool Dude 🙂 Thank you very much again 🙂

  13. Pixxel Media

    Saved one of my blogs using this tip. Thank you so much Prasanna SP. It was super easy and informative.

  14. Juan


  15. evan

    Awesome, worked great. No more double sitename titles for me. Thanks!

  16. Jan

    Though this post is a little old, it could help me!
    Thank you Prasanna!

  17. Jerry

    You made my day ^_^

    I got the same problem today after adding a code in .htaccess of my wordpress blog. I need to add something on it for redirection purposes however I noticed that in search engine my blog name appears twice. Then, I started to panic.

    I’m so thankful that I ran across this guide. It’s now fixed. Yey!

  18. Aashish Sahni

    Thank you so much for saving my time and effort! I was facing the same problem!

  19. Lucie

    Thank you 🙂

  20. Gretchen

    THANKS SO MUCH! This has been dogging me FOREVER and I could not figure it out.

  21. Arjun Salyan

    Thanks dude! It worked 100% for me and was very easy.

  22. Luke Frohling

    Thank you so much!!! This was driving me nuts and this simple code fixed it :)But… Do you know how I can replace the “-” sign between the title and description in the header(s) with a “|”?Thanks again!

  23. Gustav

    Just wanted to express my love..!
    This has been bugging me for a week or something, not being able to figure it out. Using the theme “Made” by Industrial Themes, and your quick fixed worked perfectly.


  24. Avy

    Thanks for this fix. It worked!

  25. Matt

    Just used this fix with the Yoast plugin. Thanks a bunch!

  26. Dexter

    Thanks buddy. Solved the problem.

  27. Cyberghost VPN

    Worked %100 thanks! My theme has a lot of code, and the title tag was actually doubled regardless of some plugins.
    Perfect, thanks.

  28. Ashraf Kamal

    Got another help, thank you.

  29. David

    It solved my problem, thanks.

  30. cahyasma

    I’m using Graphene theme, which overall I like very much.

    Thank you in advance and best to you,

  31. cahyasma

    Thanks buddy. Solved the problem.

  32. deddy

    Thnks man….you helped me

  33. lestari

    Thank you for the INFORMATION. Normally I don´t read the WordPress newsletter. But I am so glad that I read this one! 🙂

  34. jun

    hi, You have helped me . thx

  35. jun

    HI, You have helped me. Thx

  36. md

    Go to SEO -> Titles & Metas and mark ” Force rewrite titles”. Now solved

  37. Bhupi

    Thank you for the fix.

    =>Created a functions.php in child_theme folder and used your code to remove the duplicate titles !

  38. Untung Wibowo

    Thank you very much Prasanna, I almost re-install my site and build it from scratch. You helping me a looooot my friends. G+1 for this great post (y)
    Thanks again.

  39. kalpana

    Thank You i fixed it

  1. Pixxel Media | Graphic Design | Website Development » Wordpress SEO Plugin worth checking out

    […] we went hunting around the web and finally found the WordPress Seo Plugin double title fix.  The blog is not very pretty but it tells you exactly how to fix the problem.  In a summary, it […]

Leave a Reply

Your email address will not be published. Required fields are marked *

Please put your code snippet between <code> and </code>. Comment moderation is in use. Please do not submit your comment twice -- it will appear shortly.

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.