WordPress.org

Support

Support » Themes and Templates » Quark » [Resolved] How do i remove the canonical Url?

[Resolved] How do i remove the canonical Url?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Theme Author Anthony Hortin

    @ahortin

    Adding the following in functions.php should do it.

    remove_action('wp_head', 'rel_canonical');

    Thx. And thank u for this great theme.

    Theme Author Anthony Hortin

    @ahortin

    My pleasure 🙂

    Sorry, me again.

    That’s not working :-). Any other ideas?

    Theme Author Anthony Hortin

    @ahortin

    You might want to look into what other plugins that you have running. Something else might be adding it in.

    I’ve just run a few tests. Without Yoast’s SEO plugin installed, the above function will remove the default canonical link added by the theme. When Yoast’s SEO plugin is activated, it automatically removes the default one and adds it’s own (leaving just the one url still). And yes you’re right, adding the above wont remove the one added by Yoast SEO. But even so, my test site still only had one canonical url. I would suggest trying to disable some of your other plugins to see if it’s being added by something else.

    Thanks for your help. it’s a plugin bug/error. I will contact the Plugin author.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Resolved] How do i remove the canonical Url?’ is closed to new replies.
Skip to toolbar