WordPress.org

Ready to get started?Download WordPress

Forums

wp_title returns page title AND site title (6 posts)

  1. kstadden
    Member
    Posted 3 years ago #

    Have spend all day on this issue. This page title issue is messing up my SEO. Here's the problem. My calls to <?php wp_title(); ?> in header.php are returning the page name with the site title jammed up against it, e.g. About UsiMedicineReview, where page title is About Us and site title is iMedicineReview. Of course it should just be cleanly returning page name as all my other WP sites do. (I am seeing this by viewing page source.) It seems not to be plugin related, although I admit to not having deactivated all mine, which is a hassle. None of them are designed to mess with the title tag, as far as I can see. Anyone who really knows the guts of WP, I'd appreciate some theorizing. Or a suggestion as to how to nail down the source of the problem. Thanks.

  2. kstadden
    Member
    Posted 3 years ago #

    Spent, not spend. I meant to write "spent."

    Like I am.

  3. Rev. Voodoo
    Volunteer Moderator
    Posted 3 years ago #

    your theme can filter wp_title. You would have to look into that most likely in functions.php

    (also plugins can easily mess with things they are not supposed to touch)

  4. kstadden
    Member
    Posted 3 years ago #

    Voodoo, thanks for that idea. I'm looking at my theme's functions.php and it looks like it may be the culprit. Will be back to report on success or failure.

  5. kstadden
    Member
    Posted 3 years ago #

    That fixed it! The functions.php that came with the Starkers theme has that bug. But Starkers is just based on the Twenty-Ten theme. So... why would it be there?

    I commented out line 264 and all is well:

    // Otherwise, let's start by adding the site name to the end:
    //$title .= get_bloginfo( 'name', 'display' );

    Thanks for your help.

  6. Trivikrama
    Member
    Posted 3 years ago #

    Thank You Very Much. Found exactly what I am looking for. My Site had the same problem. Blog Title is added to the Page name. No it was fine.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags