[Resolved] Site header add on and hreflang

Home Forums Support [Resolved] Site header add on and hreflang

Home Forums Support Site header add on and hreflang

  • This topic has 9 replies, 3 voices, and was last updated 8 years ago by Tom.
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #187879
    Enrico

    Good morning,
    I am trying to use hreflang in the header, I have inserted the hreflang in the content setting page. To work correctly must I set, in advanced setting, “Merge with site header” on?

    Thanks a lot
    Enrico

    #187937
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    That shouldn’t matter – which header are you trying to add that to?

    #187955
    Enrico

    I am adding this type of content to each page header, now without the advanced setting, “Merge with site header”

    <link rel=”alternate” href=”http://example.com/en-ie&#8221; hreflang=”en-ie” />
    <link rel=”alternate” href=”http://example.com/en-ca&#8221; hreflang=”en-ca” />
    <link rel=”alternate” href=”http://example.com/en-au&#8221; hreflang=”en-au” />
    <link rel=”alternate” href=”http://example.com/en&#8221; hreflang=”en” />

    #188045
    Tom
    Lead Developer
    Lead Developer

    Maybe those would be better off in the wp_head hook in GP Hooks? I’m not familiar with those tags?

    #188059
    Enrico

    They must be slightly different for every page. If inserted in wp_head of GP Hook they will be the same in every page.

    #188147
    Tom
    Lead Developer
    Lead Developer

    Is there a specific area they need to be placed?

    A plugin like this may be helpful: https://wordpress.org/plugins/scripts-n-styles/

    #188157
    Enrico

    They can be inserted in the <head> section of every html page that has a translation.

    If they are correct and are inserted in the right position of each page, then Google should see them and show their status in: Search Console, International Targeting.

    #188158
    Tom
    Lead Developer
    Lead Developer

    In that case the plugin above should help – it allows you to add scripts into the <head> section on specific pages 🙂

    #188173
    Enrico

    Thanks a lot Tom! I realized now that I was confusing header and head. So I will remove the hreflang from the header and try to use the plugin you suggested.

    #188179
    Tom
    Lead Developer
    Lead Developer

    You’re welcome 🙂

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.