Skip to content

Instantly share code, notes, and snippets.

@xlawok
Created October 7, 2020 13:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xlawok/26a5abb3703bc6a6af7c69ded0537845 to your computer and use it in GitHub Desktop.
Save xlawok/26a5abb3703bc6a6af7c69ded0537845 to your computer and use it in GitHub Desktop.
Remove canonical tag in sole WP and in Yoast
remove_action('wp_head', 'rel_canonical');
add_action('init', function() {
add_filter( 'wpseo_canonical', '__return_false', 10 );
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment