• Resolved zakoops

    (@zakoops)


    Hello,

    I want to implement hreflang for language and regional URLs, as detailed here on Google’s Webmaster Tools.

    Some examples:


    <link rel="alternate" href="http://example.com/en-ie" hreflang="en-ie" />
    <link rel="alternate" href="http://example.com/en-ca" hreflang="en-ca" />
    <link rel="alternate" href="http://example.com/en-au" hreflang="en-au" />
    <link rel="alternate" href="http://example.com/en" hreflang="en" />
    <link rel="alternate" href="http://example.com/" hreflang="x-default" />

    I saw this post in the Add Meta Tags forum, which is some 9 months old and where you (the author’s plugin ) said: “This fix has been included in the 2.4.0 release which will be out soon with many enhancements and more complete metadata.”.

    Elsewhere, I saw this post on how to implement hreflang using your plugin. It’s not dated but judging by the comments, it could be a month old, or so…

    Since then, your plugin has been updated 2.4.3 in July 2014.

    Basically, I would like to know what is the best way to use your plugin to enable the insertion of such meta links, as shown above in the example (on per post/page basis).

    Is it still what you said some 9 months ago, or what the external post is using, or there is now a better way?

    Thanks in advance for any advice!

    https://wordpress.org/plugins/add-meta-tags/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter zakoops

    (@zakoops)

    Hi,

    Ok, I solved my problem. Just had to fill proper information into the “Full meta tags” box!

    That’s despite the warning Important note: for security reasons only meta elements are allowed in this box. All other HTML elements are automatically removed. (I presume here that a link element is different from a meta element…).

    In any event, please keep that facility as the Google’s hreflang is an important feature to keep along with all other ones already considered by your plugin (which is outstanding).

    Hey, I’m having same issue and I’m wondering what did you write in the “Full meta tags box” to get it working.

    Thanks

    Thread Starter zakoops

    (@zakoops)

    Hi Renwod,

    In my case, I have the French and English versions as two separate installations of WordPress.

    Main “entrance” is the French version at http://www.domain-name.com/ whereas the homepage for the English version is at http://www.domain-name.com/en (factice names here…)

    The following is telling Google that default page is the French version (x-default) but the equivalent English version will be found at http://www.domain-name.com/en (hence the
    “rel=”alternate” hreflang=”en”):

    <link rel="alternate" hreflang="en" href="http://www.domain-name.com/en" />
    <link rel="alternate" hreflang="fr" href="http://www.domain-name.com/" />
    <link rel="alternate" hreflang="x-default" href="http://www.domain-name.com" />

    The above 3 lines have been entered in the “Full meta tags:” field of the Add Meta Tags plugin for both home pages (in the French and English versions) and not in the general settings called Metadata Settings of the plugin.

    Hope that helps!

    Thread Starter zakoops

    (@zakoops)

    Hi again,

    Forgot to add:

    If you have a post called “my preferred cat”, then you would have:

    <link rel="alternate" hreflang="en" href="http://www.domain-name.com/en/my-preferred-cat" />
    <link rel="alternate" hreflang="fr" href="http://www.domain-name.com/mon-chat-prefere" />
    <link rel="alternate" hreflang="x-default" href="http://www.domain-name.com/mon-chat-prefere" />

    …for each version of the posts (English and French).

    But, if the French post (mon chat préféré) has no English version, then you forget these meta tags for that unique French post. That’s my understanding in accordance with the Google recommendations.

    Thank you for the answer but i just wanted to know how did you add a link type with add meta tags. Btw now i added them editing Header.php, adding links for every page (still don’t get why GWT says me that my website has not hreflang tags)

    Plugin Author George Notaras

    (@gnotaras)

    Hello zakoops,

    Somehow I missed this topic, possibly because it was marked as resolved before I actually see it.

    Thank you for your very useful feedback. I’ll think about how the plugin can facilitate this.

    Kind Regards,
    George

    Plugin Author George Notaras

    (@gnotaras)

    As a side note: support for multilingual content or multilingual plugins has been improved in the latest releases.

    George

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Add Meta Tags vs Google's hreflang links’ is closed to new replies.