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.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
10:00 – 14:00 | 10:00 – 14:00 | 10:00 – 14:00 | 10:00 – 14:00 | 10:00 – 14:00 | - | - |
16:00 – 20:00 | 16:00 – 20:00 | 16:00 – 20:00 | 16:00 – 20:00 | 16:00 – 20:00 | - | - |
Supporter timezone: Asia/Jerusalem (GMT+03:00)
Tagged: Compatibility
This topic contains 7 replies, has 0 voices.
Last updated by Itamar 1 day, 4 hours ago.
Assisted by: Itamar.
Author | Posts |
---|---|
July 30, 2025 at 10:26 pm #17283276 | |
markusM-54 |
Background of the issue: Symptoms: Questions: |
July 31, 2025 at 10:33 am #17284717 | |
Itamar WPML Supporter since 02/2016
Languages: English (English ) Timezone: Asia/Jerusalem (GMT+03:00) |
Hi, I can see this problem on your site map. We might be looking here at a compatibility issue with the Rank Math plugin. But I'm unsure of that yet. The option to have the HREFLANG in the site's map is relatively new. However, before proceeding with checking the compatibility issue with Rank Math, I was trying to replicate this problem on a fresh WordPress test site. I created a custom English language during the setup wizard. However, I get different results from you. I get the language codes as follows: English (United Kingdom) = en-gb Please see the attached screenshot. By default, WordPress and WPML use the en_US English language. When I look at your hidden link">screenshot, I notice another thing that is out of the ordinary. It is not possible to remove the custom languages. Please see the red X icons on my screenshot. This makes my question about how you created the languages even more valid. It will help me proceed with this case. Regards, |
July 31, 2025 at 10:39 pm #17286824 | |
markusM-54 |
Hi Itamar, We migrated from Polylang, As part of the migration, I needed the default language to be en-GB - so I removed and recreated all languages via the WPML -> language page. I then ran the polylang migration tool. Interestingly the hreflang tags are correct in the pages...just not in the sitemap. I can remove custom langauges...see screenshot below. I just don't want to as I've got hundreds of pages linked as translations. hidden link |
August 1, 2025 at 9:46 am #17287737 | |
Itamar WPML Supporter since 02/2016
Languages: English (English ) Timezone: Asia/Jerusalem (GMT+03:00) |
Hi, Thanks for adding information about your case. Thanks for sending a screenshot that shows the option to delete the custom language. Further questions, I want ot ask. At the moment, I suspect two possible causes. 1. A compatibility problem with the HREFLANG option and Rank Math. I will investigate this issue on my test site by installing Rank Math and seeing if the problem also occurs there. If it happens, I'll escalate this issue to our compatibility team. Otherwise, I'll let you know how we will proceed with this issue. Please note that I'll be able to get back to you about this issue early next week. Meanwhile, please feel free to answer my questions. Regards, |
August 5, 2025 at 8:59 am #17295527 | |
markusM-54 |
Hey just checking in, any update on this. Really want to get it sorted! Thanks |
August 6, 2025 at 6:40 pm #17300684 | |
Itamar WPML Supporter since 02/2016
Languages: English (English ) Timezone: Asia/Jerusalem (GMT+03:00) |
Hi, I was unable to replicate this problem on a fresh WordPress installation with WPML and its add-ons, and Rank Math + Pro. You can check my test site here. hidden link With this link, you'll be logged in directly. On the Rank Math sitemap, the hreflang shows correctly. For example, see here: Please check the settings on my test site and compare to your site. Hopefully you will be able to find where the fault is and correct it on your site. It is also worth trying to save the Rank Math and permalinks settings again and checking if it helps. Otherwise, it appears to be a specific problem on your site that we need to investigate further. The problem might be due to the migration from Polylang, or it might not be related to WPML. So if you need further help with this, please share the access details to your site with me. I'm enabling a private message for the following reply. Also, in case needed, please allow me to take a copy of your site. For this, I must install a plugin like Duplicator or All In One Migration. Please let me know if you agree. |
August 7, 2025 at 12:33 am #17301011 | |
markusM-54 |
OK, I have been through the configuration on your sandbox and compared to my live site. In your sandbox you have set the code and hreflang as the same value (i.e en-nz) I have confirmed that whatever is set in the "code" is used as hreflang in sitemap. You can see the test one I added to your instance. hidden link The issue is these need to be different in our environment. We need language to be but hreflang tag in sitemap needs to be en-nz to be google compliant. How do we resolve? |
August 7, 2025 at 4:00 pm #17303360 | |
Itamar WPML Supporter since 02/2016
Languages: English (English ) Timezone: Asia/Jerusalem (GMT+03:00) |
Hi, Thanks! It appears you helped us spot a compatibility problem. Regards, |