- This topic has 9 replies, 3 voices, and was last updated 6 years, 9 months ago by
Tom.
-
AuthorPosts
-
April 19, 2016 at 4:36 am #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
EnricoApril 19, 2016 at 9:32 am #187937Tom
Lead DeveloperLead DeveloperHi there,
That shouldn’t matter – which header are you trying to add that to?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentApril 19, 2016 at 10:58 am #187955Enrico
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” />April 19, 2016 at 10:28 pm #188045Tom
Lead DeveloperLead DeveloperMaybe those would be better off in the wp_head hook in GP Hooks? I’m not familiar with those tags?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentApril 20, 2016 at 12:16 am #188059Enrico
They must be slightly different for every page. If inserted in wp_head of GP Hook they will be the same in every page.
April 20, 2016 at 9:36 am #188147Tom
Lead DeveloperLead DeveloperIs there a specific area they need to be placed?
A plugin like this may be helpful: https://wordpress.org/plugins/scripts-n-styles/
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentApril 20, 2016 at 10:07 am #188157Enrico
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.
April 20, 2016 at 10:09 am #188158Tom
Lead DeveloperLead DeveloperIn that case the plugin above should help – it allows you to add scripts into the
<head>
section on specific pages 🙂Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentApril 20, 2016 at 10:25 am #188173Enrico
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.
April 20, 2016 at 11:48 am #188179Tom
Lead DeveloperLead DeveloperYou’re welcome 🙂
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-development -
AuthorPosts
- You must be logged in to reply to this topic.