Let's Create Something Extraordinary!

WebGate is not just a design studio; we are your partners in digital transformation. Whether you're launching a new web application, revitalizing your brand, or adapting to the mobile era, we have the expertise to bring your vision to life. Ready to elevate your online presence?

Share on Facebook Share on Twitter

Removing rel="canonical" in WordPress for SEO by Yoast Plugin

Removing rel="canonical" in WordPress for SEO by Yoast Plugin thumb

To remove the head record   <link rel="canonical" href="" /> when you are using the WordPress SEO by Yoast plugin, simply insert the following code into your theme's functions.php file before the closing php tag:

// Remove Canonical Link Added By Yoast WordPress SEO Plugin
function at_remove_dup_canonical_link() {
        return false;
}
add_filter( 'wpseo_canonical', 'at_remove_dup_canonical_link' );

Otherwise, you may encounter indexing problems, for example in Yandex, where many pages will be excluded by the robot due to "The document is non-canonical"

You might also like

Adblock blocks the site's own banners