• I’m getting duplicate canonical tags on my pages and posts, one is inside of the WordPress SEO commented section, and the other is elsewhere in the header. I am running the latest version of WordPress 3.1.3 and the Genesis framework.

    After doing some testing and adding the following filters to my functions.php:

    remove_action('wp_head', 'genesis_canonical');
    remove_action('wp_head', 'rel_canonical');

    … what I get is this:

    With the plugin active + NO “remove action” – duplicate canonical tags
    With the plugin disabled + NO “remove action” – a single canonical tag
    With the plugin disabled + A “remove action” – no canonical tag

    I have tried using only one of these remove_actions at a time, and then combining them both. Regardless, as long as I have the plugin active I get duplicate canonical tags.

    Is this a bug in the plugin, perhaps somehow enabling the canonical functionality of WordPress?

    Thanks for your help as this is driving me crazy.

    Sincerely,

    Robert Dempsey

    https://www.ads-software.com/extend/plugins/wordpress-seo/

Viewing 5 replies - 1 through 5 (of 5 total)
  • I’m also using the Genesis theme and having the same issue when using the WordPress SEO plugin.. Perhaps it could be something to do with the built-in SEO functions of the Genesis framework theme not completely being disabled?

    Let me know what you come up with.

    Hey,
    I have some kind of the same problem. I’m using a own template and this has a own logic for defining the canonical-url (in the header.php). With the seo plugin enabled I get a duplicate canonical url in the header and some times different ones which is very bad ??

    Is there a option to disable the canonical part from the seo plugin? I’ve commented the part out but with the next update it’s back again i think.
    Would be nice i it would be possible.

    Agree on this point. I think they should add an option to disable canonical links on the plugin.

    Hope Yoast consider this.

    carsuk

    (@carsuk)

    In case anyone else is looking for a solution to this, we’ve found something that works for us:

    function canonical() {
        remove_action( 'wp_head', 'rel_canonical' );
    }
    add_action( 'init', 'canonical', 99 );

    I am getting a duplicate canonical and I think a duplicate meat description. My theme already does a lot of the SEO, and I’m mainly using this plug in to allow me to enter in custom meta descriptions and titles.

    Does anyone know if this solution solves the problem?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: WordPress SEO by Yoast] Duplicate canonical tags in header’ is closed to new replies.