Need to remove canonical url and og:url – but the hook doesn't work
-
Hi,
I need to disable rel=”canonical” and the og:url meta tag but this really straightforward snippet that I found in this forum doesn’t work (I added it in theme’s functions.php):
add_filter( 'wpseo_canonical', '__return_false' );
It doesn’t do anything at all. Maybe this hook is called before Yoast SEO is loaded (so it just gets overwritten)? That could be a plausible reason.
But it doesn’t matter which method, I just need to know how can I disable canonical and og:url as I don’t want duplicates that confuse crawlers.
Help, please, I’m going crazy over this ??Cheers,
G
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Need to remove canonical url and og:url – but the hook doesn't work’ is closed to new replies.