Archived topic
Site header add on and hreflang
9 replies · Started by Enrico on April 19, 2016
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
Hi there,
That shouldn't matter - which header are you trying to add that to?
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" 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" />
Maybe those would be better off in the wp_head hook in GP Hooks? I'm not familiar with those tags?
They must be slightly different for every page. If inserted in wp_head of GP Hook they will be the same in every page.
Is there a specific area they need to be placed?
A plugin like this may be helpful: https://wordpress.org/plugins/scripts-n-styles/
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.
In that case the plugin above should help - it allows you to add scripts into the <head> section on specific pages :)
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.
You're welcome :)
