Thank you for contacting WPML Support, I will gladly help you.
When reviewing your sitemap I can see it's showing for ES and PL
hidden link hidden link
However, that is not the expected behavior.
Your sitemap should show all languages under 1 sitemap, the only time you should get a different sitemap per language is if you are using a different domain per language.
I suggest verifying you are using the latest versions of Yoast SEO, WPML, and WPML SEO
Then do a manual sitemap update, by disabling the sitemap feature, clearing the cache, and enabling the sitemap feature to force the sitemap to rebuild.
---
Regarding the code you provided, please note that custom coding is beyond the scope of this support forum, we recommend that you check our contractors' page: https://wpml.org/contractors/.
Thank you for understanding and I hope you find this information helpful.
Let me know if you have any more questions.
Kind regards,
Marsel
The topic ‘[Closed] WPML SEO addon blocks sitemap per language’ is closed to new replies.