Canonical link and WPML
-
Hi,
I’m working with the WPML plugin and we’ve some duplicated pages. These pages show the primairy language (English) in the alternative laguages.
The WordPress SEO plugin adds a canonical link in the head section, for example:
<link rel=”canonical” href=”https://whatever/mypage/” /> on the English page and that is fine.
But on a German page (which is a duplicate) for example it generates:
<link rel=”canonical” href=”https://whatever/de/mypage/” />
And that is not correct. It should refer to the primary language:
<link rel=”canonical” href=”https://whatever/mypage/” />
In this case i’m getting duplicated content.
Is there a way to remove that canonical link that is generated by the SEO plugin? I have used: add_filter( ‘wpseo_canonical’, ‘__return_false’ ); but this removes all the canonical links, also the one that WPML provides.
- The topic ‘Canonical link and WPML’ is closed to new replies.