disable wordpress canonical tag meta

wordpress core automatically generates canonical tag in HEAD section:

<link rel="canonical" href="http://blabla.com" />

how to disable/remove that?

Related posts

1 comment

  1. found solution: before wp_head() command, insert:

    remove_action('wp_head', 'rel_canonical');
    

    p.s. if generator meta tag is being added from elsewhere (i.e. from theme or plugin, rather than wp-core) and was priority other than 10, then you might need to put the exact priority, as is was given from that theme/plugin:

    i.e. remove_action('wp_head', 'rel_canonical', 47);
    

Comments are closed.