Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter Paul

    (@paulpdb)

    I should really have looked into this further before asking the question, sorry!
    The first link tag is generated by The SEO Framework and uses the quotation marks ” “. Which is fine.
    The problem with the second link (which uses ‘ ‘) is generated I believe by another plugin or theme. My problem is I can’t fathom which one. It appears on line 127 on this test site

    https://bud.paulbeacham.co.uk

    * html body { margin-top: 46px !important; }
        }
    </style>
        <link rel="alternate" type="application/rss+xml" title="My Blog | Site Wide Activity RSS Feed" href="https://bud.paulbeacham.co.uk/activity/feed/" />
    <link rel='canonical' href='https://bud.paulbeacham.co.uk/' />
    </head>

    Thanks,
    Paul

    Plugin Author Sybre Waaijer

    (@cybr)

    Hi Paul,

    The issue lies in none of the mentioned plugins. It’s also not caused by JetPack or bbPress.

    Are there any other plugins you have active? From there I can inspect what’s causing this issue.

    Thanks and have a great day!

    Thread Starter Paul

    (@paulpdb)

    Hi Sybre,

    I’m pretty sure it’s Buddypress.
    I have deactivated most plugins leaving 3 plugins active Buddypress, Jetpack and The SEO Framework.
    When I deactivate Buddypress the 2nd canonical link tag no longer appears. When I reactivate Buddypress it reappears. All 3 plugins are the latest versions as is WordPress.

    I’ll wait to hear from you before raising this with Buddypress support.

    Thanks,
    Paul

    Plugin Author Sybre Waaijer

    (@cybr)

    Well done Paul!

    I’ve been able to replicate it on BuddyPress pages and I’ve found a fix.

    Please use the following snippet to remove BuddyPress’ canonical URL output. I’ll be sure to add it myself in The SEO Framework 2.7.0 as well.

    remove_action( 'wp_head', '_bp_maybe_remove_rel_canonical', 8 );

    You can place that piece of code in your theme’s functions.php file.

    I hope this helps! Have a wonderful day :)!

    Thread Starter Paul

    (@paulpdb)

    Hi Sybre,

    Just to confirm that worked.

    Thanks,
    Paul

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Duplicate canonical link tags’ is closed to new replies.