Support » Plugin: Yoast SEO » [Plugin: WordPress SEO by Yoast] The title for all pages shows the blog name twice

  • I’ve tested this on a fresh install of wordpress 3.3 with only the Yoast WordPress SEO plugin installed and activated and the results are consistent for me.

    I’m using the default twenty eleven theme and have changed the code in the header.php for the <title> tag to <?php wp_title(”); ?>

    I’m also setting a static page as the front page.

    Under the “Title Settings” in the wordpress seo plugin I have tested a few of the patterns. Here are the patterns with the corresponding results for the page title that is produced:

    Page Name: “Sample Page”
    Blog Title: “My Blog”

    %%title%% | %%sitename%% -> “Sample Page | My BlogMy Blog”
    %%title%% -> “Sample PageMy Blog”
    [left empty] -> “My Blog”

    This seems to be a problem with wordpress 3.3 in general because if I disable the WordPress SEO Plugin then I get the following behavior for the home page (designated by setting the option for a static page for the home page):
    Blog title: “My Blog”
    Tagline: “The tagline”
    Page Name: “Sample Page”

    Title generated -> “My Blog | The tagline”

    So the page name doesn’t get included at all. And then if I test another page that is NOT the home page (just another page) then I get the following output:
    Blog title: “My Blog”
    Tagline: “The tagline”
    Page Name: “Another Page”

    Title generated -> “Another PageMy Blog”

    Can someone else verify this behavior?

Viewing 6 replies - 1 through 6 (of 6 total)
  • I’m having the same issue here..

    I noticed the same issue. It appears that 3.3 automatically inserts the title.

    Same issue with 3.3.

    I’ve already changed the wp_title code as described at the top of the “Titles” admin page for wordpress SEO, but that by itself does not make it work for me.

    It did start working correctly after I checked the box “Force rewrite titles”

    Could it be that your theme (originally) contained the following code

    wp_title( '|', true, 'right' );
    // Add the blog name.
    bloginfo( 'name' );
    // Add the blog description for the home/front page.
    $site_description = get_bloginfo( 'description', 'display' );
    if ( $site_description && ( is_home() || is_front_page() ) )
    	echo " | $site_description";
    ... etcetera

    If so, try commenting out the bloginfo line. The duplicate MyBlog should disappear.

    wordpress-SEO suggests that the only code you need for <title> is a call to wp_title(”); So you should comment out the rest of the code.

    Thanks for the response bobbingwide, I appreciate it.

    I was hopeful that maybe you were right and I had overlooked this, but I just checked and there is no other bloginfo code anywhere in the theme (that would have this effect).

    I actually went through a debugger (phped) and tried to trace out the problem, but the recursive calls get pretty deep and it’s a bit difficult to follow. I actually did find in the code where the value gets replaced and adds on the blog name the second time, but I wasn’t able to figure out what was causing it in the code.

    The problem is resolved by checking the option to “Force rewrite titles”. I’ve set the title code using <?php wp_title(”); ?> as instructed, but the title only gets set correctly if I check the force rewrite titles option as well.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Plugin: WordPress SEO by Yoast] The title for all pages shows the blog name twice’ is closed to new replies.