Disable link rel=’canonical’ at theme level
Running a modified version of the plugin SEO Super Comments which creates spiderable pages from comments.
Since link rel=’canonical’ was added to WordPress core (I used to add it at theme level) the single comment pages created by the plugin like
Now have a rel=’canonical’ tag within the head pointing to the single blog post the comment is related to. This means Google won’t keep these pages indexed making the plugin useless.
I use a copy of single.php (renamed and edited) to generate the single comment pages, ideal solution would be to not use the
add_action( ‘wp_head’, ‘rel_canonical’ );
For just that template page.
If that’s not realistic, completely disable the filter at theme level and I’ll just keeping using the code I used to use to add rel=’canonical’ to various pages.
The theme I use is also sold, so although I could easily remove the filter from wp-includes/default-filters.php I need it at theme level as I’m working on a new release of the theme with support for the SEO Super Comments plugin.
- The topic ‘Disable link rel=’canonical’ at theme level’ is closed to new replies.