I'm trying to remove the canonical link reference from my page headers and I'm using the following code in my functions.php:
remove_action('wp_head', 'rel_canonical');
However, when I test the return value of remove_action it's value is FALSE and I notice that the canonical link reference is still rendered in the head of my pages.
I've tried wrapping the remove_action in an init but I get the same result:
function my_init()
{
remove_action('wp_head', 'rel_canonical');
}
add_action('init', 'my_init');
How do I remove the canonical link reference from my page headers?