WordPress.org

Ready to get started?Download WordPress

Forums

WordPress SEO by Yoast
Yoast WordPress SEO Forces Canonical URLs: Option to Turn Canonical URLs Off (1 post)

  1. SEO Dave
    Member
    Posted 8 months ago #

    I'm looking for a way to disable Yoast's canonical URLs (before they are generated, not delete them after they are generated) on Posts with paginated comments with format:

    'example.com/post-name/comment-page-2#comments'

    My research suggests this isn't possible?

    I fully understand the argument for why Yoast WordPress SEO treats paginated comments and it's probably right for your average theme, each paged comment will include the full posts content and have the same title element, highly unlikely Google would index comment page 2 and rank it for anything useful since the main content is on the main post.

    However, this should be an option to use the canonical URL to the main post or like with All In One SEO Pack at least an option to completely disable the plugins canonical URLs so they can be generated another way (WordPress by default does a good job generating canonical URLs for most page types).

    The current version of Yoast WordPress SEO is breaking some theme features in the theme I develop that work perfectly with the default WordPress canonical URLs and there's no way to disable the Yoast canonical URLs BEFORE they've been generated. There should be an option(s) to disable them before they remove the default WordPress canonicals.

    Currently my only option is use code like:

    '<?php add_filter( 'wpseo_canonical', '__return_false' ); ?>'

    to delete the canonical URLs completely after Yoast has generated them, which means either the site runs with no canonical URLs or I'll have to delete the Yoast ones (with the code above) and create new ones to replace the default ones deleted by Yoast (far from ideal!). In my research for a solution read a fair number of similar issues where the Yoast canonical URLs don't work with various plugins.

    David

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

Reply

You must log in to post.

About this Plugin

About this Topic