How to create a tag link "alternative" dynamically
-
Hi everyone,
As my topic title, I need to generate on the fly for any page the tag
<link rel=”alternate” media=”only screen and (max-width: 640px)” href=”www.example.com/MobileSite/correspondingPHPpage.html”>
Because I have got a Desktop site (wordpress) and a mobile site so I need to put in relation all pages that match, in order to don’t let take from the crawler duplicate pages.
How can I update the href based on the page I am viewing.
I need to do this, because I have read it on Google documentation, here it is:
https://developers.google.com/webmasters/smartphone-sites/details#separateurlsI thought it was possible to do that throughout jQuery but I didn’t find the right place where is explained it.
Could be made by php? How?Any suggestion or documentation is appreciated,
thank you in advance.
- The topic ‘How to create a tag link "alternative" dynamically’ is closed to new replies.