This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This thread is resolved. Here is a description of the problem and solution.

Problem: Google Webmaster Tools is showing that my site is missing hreflang. How can I fix this?

Solution: Our developers fixed the issue and the fix will be available in the next major version of WPML.

In the meantime you can use the workaround provided in the following article: - https://wpml.org/errata/hreflang-does-not-use-the-language-tag/

Relevant Documentation: https://wpml.org/errata/hreflang-does-not-use-the-language-tag/

This topic contains 9 replies, has 2 voices.

Last updated by harrieM 1 year, 8 months ago.

Assigned support staff: Lauren.

Author Posts
October 15, 2017 at 9:59 am #1401205

harrieM

I am trying to: use WPML hreflang for international targeting in Google webmastertools

Link to a page where the issue can be seen: hidden link

I expected to see: hreflang in Google webmastertools

Instead, I got: nothing...

October 16, 2017 at 7:27 pm #1402591

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

Hi Harrie, thanks for contacting WPML support. I'll be happy to help you with this.

When I view your page source, I can see the hreflang (see attached screenshot). From what I can see in the HTML source of your pages, the "Language tag" of your languages needs to be changed (eg. from "es-es" to "es"). See the yellow section of the attached screenshot:

You can do it from WPML -> Languages -> Edit Languages. Once this is changed, please let me know if the issue is resolved.

Thank you

Related documentation:
https://wpml.org/documentation/support/editing-wpmls-languages-table/
https://wpml.org/documentation/support/adding-hreflang-wordpress/

October 16, 2017 at 7:47 pm #1402611

harrieM

Hello Lauren,
In the attachement you can see that the column Language tag already contains only 2 karakters (nl, en, de and es). so i can not change it... (or do I don't understand you right?)

October 16, 2017 at 8:01 pm #1402630

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

Thanks so much for sending the screenshot. You did understand me correctly 🙂

It looks like another client has submitted a similar issue that I think is related, and so I am escalating this to our 2nd Tier Support team so they can look into this further. I will report back here as soon as I have more information.

October 23, 2017 at 4:04 pm #1409009

harrieM

Hi Lauren, do you know more about my support issuu?
Gr.
Harrie

October 25, 2017 at 9:06 pm #1412090

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

Hello,

Our developers fixed the issue and the fix will be available in the next major version of WPML.

In the meantime you can use the workaround provided in the following article:
- https://wpml.org/errata/hreflang-does-not-use-the-language-tag/

Please let me know if this solves the issue or if you need further details.

October 29, 2017 at 8:45 am #1414900

harrieM

You're talking about a fix in the next main version. Is that in the Multilingual Blog version?
And about the workaround: where can i find that CSS-code..? Can't find it in my WordPress installation.

October 30, 2017 at 12:22 pm #1415616

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

Yes, the fix will be available in the next main version of WPML core plugin, which is part of the WPML Blog version.

The code to edit will be in the wp-content/plugins/sitepress-multilingual-cms/classes/seo/ folder.

Please let me know if you need any further assistance and I will be happy to help.

October 31, 2017 at 6:13 am #1416352

harrieM

Hi,
I've made the work arround! I hope it works!
Tx.

November 2, 2017 at 9:07 pm #1419594

harrieM

Hi,
I put your workarround in the website, but Google (webmastertools) is still not recognizing the hreflangs..... What went wrong?

gr.

Harrie