WordPress.org

Ready to get started?Download WordPress

Forums

WordPress SEO by Yoast
Can't override title on posts page (7 posts)

  1. smerriman
    Member
    Posted 2 years ago #

    When I have a static homepage + separate posts page set, and using the WordPress SEO plugin with default settings, the title for the posts page solely contains the title of the page (no blog name). Attempting to override this with the SEO Title field on that page does not change anything.

    Had a quick look into the plugin and I saw why: in the title() function in frontend/class-frontend.php, lines 91 onwards, we have:

    if ( $this->is_home_static_page() ) {
    ...
    } else if ( $this->is_home_posts_page() ) {
    ...
    } else if ( $this->is_home_static_page() ) {
    ...
    }

    The third block is where all the code for this posts page is handled, but since $this->is_home_static_page() is true in the first if condition, 'else if' will always return false in the third.

    http://wordpress.org/extend/plugins/wordpress-seo/

  2. Joost de Valk
    Member
    Plugin Author

    Posted 2 years ago #

    Ok you're 100% right. That's a genuine bug and a failure in my logic. Will patch in 1.1.2 later today.

  3. Norbert Woehnl
    Member
    Posted 2 years ago #

    Hi Joost, thanks a lot for all your ongoing hard work with this plugin.

    I just upgraded to 1.1.2 on one of my sites, but it still doesn't pick up the title that I have set on my separate posts page. Instead, it will just show the URL as a page title. You can see in the page source though, if you look at the og:title property in the code section added by your plugin, that I edited the blog page to set an individual title. Any ideas?

    http://www.norbertwoehnl.com/de/blog/

  4. mrwweb
    Member
    Posted 2 years ago #

    +1 for nwoehnl.

    I'm having this problem as well and 1.1.2 did not resolve it.

  5. smerriman
    Member
    Posted 2 years ago #

    Yeah, there's still a bug - on line 80 of frontend/class-frontend.php, change:

    return ( is_home() && 'page' != get_option('show_on_front') && is_page( get_option('page_for_posts') ) );

    to

    return ( is_home() && 'page' == get_option('show_on_front') && is_page( get_option('page_for_posts') ) );

  6. smerriman
    Member
    Posted 2 years ago #

    If fact, no, there are even more bugs..
    is_page(get_option('page_for_posts')) will never return true because is_home() is true, so that needs to be removed from the line above too.

    Plus, in the latest version with default settings the static homepage will now show no title whatsoever since it chooses between the overridden SEO title, or the Page template title setup, both are which are blank by default - doesn't consider the page title at all, or the blog name. And once the line above is fixed, the posts page won't show the site name either with default settings, just the page title which is inconsistent with the rest of the site.

  7. sburkowski
    Member
    Posted 2 years ago #

    This may be the same issue I am having so instead of starting a new support thread I'll post my question in here in hopes someone can please help me?

    Every time I post a blog posts url into a Facebook page the posts title doesn't come up only my blog's title. Also no description or content from the post shows up on Facebook only my post details. For example, try posting this link to your facebook and you'll see what I mean: http://www.shaunburkowski.com/blog/is-it-worth-buying-old-movies-for-blu-ray-to-watch-on-your-hdtv/

    On facebook the POST title should be shown NOT the blog title, etc. Is this related to the bugs as mentioned above?

    I'm not a strong coder so any feedback for a novice would be very helpful.

    ps. I have several other sites that are not running the Yoast SEO plugin and are not having the same issue so I strongly believe it is related to this plugin. I tried deactivating this but I believe the WP code has been modified and simply deactivating the plugin did not resolve the issue.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic