I need to modify or remove the canonical url for specific pages.
The problem is the current canonical URL doesn't include the query string ?
So I need to remove this or modify it some how...
To clarify, say the canonical tag looks like this:
<link rel='canonical' target='_blank' href='http://www.domain.com/page/' />
but I need it to be:
<link rel='canonical' target='_blank' href='http://www.domain.com/page/?s_id=5' />
This of course matches the page URL: http://www.domain.com/page/?s_id=5
For now, I am happy just to disable the function from infinite seo that is setting the canonical URL - but I don't know how..
The reason I need this is because it is preventing me from sharing these pages on facebook correctly as the set canonical url is incorrect.
If I deactivate the Infinite SEO plugin, I am able to share the page on facebook no problem as the canonical tag is no longer being used on this page. As I have disabled the wordpress canonical url for this specific page by adding the following code into my them functions.php file:
How do I do the equivalent when using the infinite seo plugin? I obviously want to use infinite SEO so deactivating it isn't an option.
Hoping this makes sense... Thanks for your help!