Hi everyone,
I'm driving myself insane trying to figure this one out and am hoping someone has more technical chops than I do. Here's the situation...
I'm getting duplicate canonical tags on my pages and posts, one is inside of the WordPress SEO (plugin) commented section, and the other is elsewhere in the header. I am running the latest version of WordPress 3.1.3 and the Genesis framework.
After doing some testing and adding the following filters to my functions.php:
<code>remove_action('wp_head', 'genesis_canonical');
remove_action('wp_head', 'rel_canonical');</code>
... what I get is this:
With the plugin active + NO "remove action" - duplicate canonical tags
With the plugin disabled + NO "remove action" - a single canonical tag
With the plugin disabled + A "remove action" - no canonical tag
I have tried using only one of these remove_actions at a time, and then combining them both. Regardless, as long as I have the plugin active I get duplicate canonical tags.
Is this a bug in the plugin, perhaps somehow enabling the canonical functionality of WordPress?
Thanks for your help everyone.