Skip Navigation

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

Problem:
How to add an HTML sitemap that only includes links to posts in the selected language.
Solution:
If you're experiencing issues with creating an HTML sitemap that includes only posts in a specific language, we recommend using the "different domain per language" option. You can find more information on how to set this up in our documentation: Using WordPress SEO with WPML.

If you're not using the "different domain per language" option, it's important to note that WPML automatically adds "hreflang" tags to each page, which eliminates the need for a separate sitemap link for each language. Therefore, you won't see translated links in your sitemap.

If this solution doesn't look relevant to your situation, please feel free to open a new support ticket in our support forum.

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.

Tagged: 

This topic contains 1 reply, has 2 voices.

Last updated by Mihai Apetrei 11 months, 1 week ago.

Assisted by: Mihai Apetrei.

Author Posts
January 22, 2024 at 3:16 am #15209268

timK-2

Hi there

How can I add an HTML sitemap that only includes links to posts in the selected language?

E.g. hidden link

Thank you

Tim

January 22, 2024 at 11:47 pm #15213821

Mihai Apetrei
Supporter

Languages: English (English )

Timezone: Europe/Bucharest (GMT+02:00)

Hi there, Tim.

You can get different sitemaps only if you use the "different domain per language" option:
https://wpml.org/documentation/related-projects/using-wordpress-seo-with-wpml/#translate-sitemaps

If you don't use that option (and from what I see, you don't), things are working a little differently.

WPML puts in "hreflang" tags into each page automatically so a new sitemap link for each language is not needed. That is why you don't have the translated links in the sitemap.

I hope that you will find this information helpful.

Kind regards,
Mihai Apetrei