Force AMP canonical
-
I have finally rewritten my .htaccess to ReWrite all of the urls to the ?amp versions created by the AMP plugin as the theme I developed years ago no longer looks and feels as nice as the one I have modified through the AMP plugin templates.
As such, I no longer wish the WP pages and posts to be canonical nor do I want them to be alternates. Rather I want the ?amp versions to be the canonical and nothing else…So, in the single.php I have written
<link rel="amp_canonical" href="<?php the_permalink(); ?>?amp/" />
And upon checking the inspect source element, I can see this pulls through the appropriate version HOWEVER, it would appear that the plugin itself also has a directive to pull in the permalink as the canonical… How can I remove/modify/etc this call so it does not reference the unAMPed version at all?
TIA
The page I need help with: [log in to see the link]
- The topic ‘Force AMP canonical’ is closed to new replies.