WordPress.org

Ready to get started?Download WordPress

Forums

WordPress SEO by Yoast
[resolved] [Plugin: WordPress SEO] Title problem for posts in TwentyTen (20 posts)

  1. Marcel Brinkkemper
    Member
    Posted 3 years ago #

    When I put in an SEO title for my posts, the last word of the title is joined together with the site name like:
    The title of my postSitename.
    I'm using the Twentyten theme in WordPress 3.0.1

  2. Joost de Valk
    Member
    Plugin Author

    Posted 3 years ago #

    This has been resolved in 0.1.5, you can either change the title element in the code, or set the plugin to force rewrite the titles for you.

  3. Marcel Brinkkemper
    Member
    Posted 3 years ago #

    Hi Joost,
    I'm still struggling with this one.
    If I don't use forced rewrites, the sitename is displayed without a space, Even when I put in a space as last character of the seo title. The last trick did work in previous versions.
    If I do use forced rewrites, I would expect the plugin to use the title templates. My template is %%title%% | %%sitename%%, but the sitename isn't displayed.

  4. Marcel Brinkkemper
    Member
    Posted 3 years ago #

    Another nasty bug: When I delete the seo title in a page, some javascript puts it back in. Using Firefox 3.6.12

  5. Joost de Valk
    Member
    Plugin Author

    Posted 3 years ago #

    Hey, any chance I could log into your site and test the sitename display?

    The javascript acting that way is going out, I've revised how it works a bit to make it simpler for everyone to use.

  6. Marcel Brinkkemper
    Member
    Posted 3 years ago #

    Hi Joost,
    A few things I have noticed in WPSEO_Frontend::title()

    • The separator as defined in a theme ( $sep ) isn't used.
    • $title is trimmed. So the Blog name will be glued to the title, even when I put a space as last character of the seo-title.
  7. Joost de Valk
    Member
    Plugin Author

    Posted 3 years ago #

    No both are correct, because you have to define the entire title in the title settings, that you use them elsewhere is sort of your problem :) Although in the fallback, I could set separator to $sep, that's a fair point :)

  8. Marcel Brinkkemper
    Member
    Posted 3 years ago #

    This is what I get when I don't put in Any title templates for posts:
    http://marcel.brinkkemper.com/2010/10/17/test/
    The seo title in the post is: This is a test | My dear test weblog
    The actual title display is : This is a test | My dear test weblogMarcel’s weblog
    The original site name is appended without a separator.
    When I use %%title% as template, same result.
    Please leave a comment on the site, so I'll have your e-mail and you could check it.

  9. Marcel Brinkkemper
    Member
    Posted 3 years ago #

    (fun) In TwentyTen's header.php bloginfo( 'name' ); is hardcoded after wp_title( '|', true, 'right' );
    Force title rewrite works, but then I can't use the title rewrites of my lazyest-gallery plugin.

  10. Joost de Valk
    Member
    Plugin Author

    Posted 3 years ago #

    No, in that case you'll have to change the theme and remove the hardcoded bloginfo and all other crap that twentyten has there.

  11. Marcel Brinkkemper
    Member
    Posted 3 years ago #

    That's what I'll do...
    Er zit niet anders op...

  12. Joost de Valk
    Member
    Plugin Author

    Posted 3 years ago #

    Well it's the only way of having best of both I think, and btw... Force title rewrite is SLOW compared to just having wp_title there...

  13. Marcel Brinkkemper
    Member
    Posted 3 years ago #

    Suggestion for a future release: filter for the seo title.

    $title = apply_filters(
      'wordpress_seo_title', $title, $sep, $seplocation, $postid );
    return esc_html( stripslashes( $title ) );

    I have added this to make your plugin work with Twentyten and Lazyest Gallery and I don't have to hack plugins or themes after upgrading.

  14. Beee
    Member
    Posted 3 years ago #

    is that why my title on http://www.berryplasman.nl/2000/ is

    » 2000 | Beee v0.3 ? instead of without » ?

  15. Marcel Brinkkemper
    Member
    Posted 3 years ago #

    Hi Joost,
    I have checked a lot of themes, and most of them have something like
    <?php bloginfo('name'); ?> <?php wp_title(); ?> in the header.

    That means that having the blog name in the SEO template, It will show twice. May be something to consider. Not everybody knows how the hack the header.php file.

  16. Joost de Valk
    Member
    Plugin Author

    Posted 3 years ago #

    That's why there's a force rewrite title function in there, it'll really force rewrite it by using an output buffer. It's slower than changing your header.php file, but if you don't know how to do it, it's the better solution.

  17. Sebastien Couture
    Member
    Posted 3 years ago #

    Hello,

    Just for the sake of contributing in case someone else has this problem. I was having a similar issue and my titles where generated as My article titleMy Blog - Blog description.

    The issue as it turns out was that my theme is developed WP Framework which uses its own function to generate titles, semantic_title(). Changing the title to call the wp_title() function took care of the problem.

    By the way, thanks for a great plugin. I discovered it not long ago and was very pleased that it replaces about 6 plugins I was using! A great feature would be to incorporate SEO Friendly Images and Custom Permalinks functionality.

    I'm actually using a translated French version I found over at http://www.blog-expert.fr/plugins-wp/wordpress-seo-francais-661.html. They even wrote French documentation. These guys deserve a big heads up :)

  18. BigBiffs
    Member
    Posted 3 years ago #

    So how do we fix this? I am also having this issue and I am not sure what needs to be removed from the header.php

    can you be more specific?

    Thanks

  19. charlottefranklin
    Member
    Posted 3 years ago #

    You go to header.php in your current theme

    Then you need to delete the following:

    <?php bloginfo('name'); ?>

    That fixed it for me.

  20. strangerstudios
    Member
    Posted 2 years ago #

    I was having the delimiter in front of the title bug. Not sure who the culprit is, but I did this hack to fix it:

    <?php echo ltrim(wp_title("|", false), "|"); ?>

    The second parameter of wp_title, tells WP to return the string instead of echoing it.

    The ltrim function trims the delimiter off the front of the string.

    You can tweak this to use different delimiters or right hand delimiters, etc.

    Hope this helps some people.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic