WordPress.org

Ready to get started?Download WordPress

Forums

WordPress SEO by Yoast
Canonical URLs (2 posts)

  1. dhilditch
    Member
    Posted 1 year ago #

    Yoast is writing a canonical url for my datafeedr store which is totally wrong. Datafeedr hosts multiple pages underneath one wordpress page but Yoast only sees http://www.fitness-saver.com/uk/

    The actual page this has been taken from is: http://www.fitness-saver.com/uk/speedo-elite-pullbuoy-foam-25200502798220/

    Is there a way to switch Yoast OFF for certain URLs?

    Dave

    <!-- This site is optimized with the Yoast WordPress SEO plugin v1.2.5 - http://yoast.com/wordpress/seo/ --><link rel="canonical" href="http://www.fitness-saver.com/uk">
    <!-- / Yoast WordPress SEO plugin. --><link rel="alternate" type="application/rss+xml" title="Fitness Saver ยป Feed" href="http://www.fitness-saver.com/feed/">
    <

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

  2. secretive
    Member
    Posted 1 year ago #

    David, in case you're still having problems with this, I found a neat solution in a forum - code I used is:

    function dfr_remove_wpseo_canonical ($canonical) {
         if (is_dfr ()) {
             $canonical = false;
         }
         return $canonical;
    }
    add_filter ('wpseo_canonical', 'dfr_remove_wpseo_canonical');

    Original post for reference is (http://www.seoguru.nl/seo-forum/vragen-en-discussies/1380-datafeedr-bevat-alleen-canonical-links.html). (It's in Dutch ;), I used Google Translate)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic