[Plugin: WordPress SEO by Yoast] How to remove rel=canonical from tag pages
-
Hi friends:
I want to noindex my tag pages but I’ve noticed that, although I’ve marked them as noindex, WordPress SEO plugin still adds rel=canonical tag.
Google says rel=canonical and noindex directives must not be together. So, I tried to remove canonical tag adding the following code to my functions.php file:
if ( is_tag() ) { add_filter( 'wpseo_canonical', '__return_false' ); remove_action('wp_head', 'rel_canonical'); }
But nothing happened. The canonical tag is still there.
Do you know hao I can remove it?
Thanks in advance.
- The topic ‘[Plugin: WordPress SEO by Yoast] How to remove rel=canonical from tag pages’ is closed to new replies.