Support » Plugin: The SEO Framework » WPML: sitemap does not add the language string in URLs

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Sybre Waaijer


    Hello 🙂 I’m glad you’re still around!

    Could you check if those pages have their languages tagged correctly via WPML? I notice only a few posts are affected by this issue.

    Please note that there are two sitemap versions–one for English, and one for Dutch:

    The Dutch version shows those links correctly. So, I’m led to believe the posts in question have extraneous/erroneous language metadata attached.

    Thread Starter pixeline


    Hello Sybre 🙂

    I double-checked: the pages are correctly marked as “nederlands”.

    I have another question: why is the sitemap limited to 45 pages when I have 98 pages in total ?

    Thread Starter pixeline


    I see there is the 2.4.0 version available. I’ll test and report back if it solves the issue or if it continues.

    update: nope, the issue remains.

    • This reply was modified 1 year, 6 months ago by pixeline.
    • This reply was modified 1 year, 6 months ago by pixeline.
    Plugin Author Sybre Waaijer



    I published a KB article just this morning, where I explain why each locale has a unique sitemap, and the usage of WPML + TSF in general:

    For your site, here you can find the respective locale’s sitemaps:
    English sitemap: /sitemap.xml
    Dutch sitemap: /nl/sitemap.xml
    French sitemap: /fr/sitemap.xml

    The Dutch and French sitemaps look good to me.

    Now, the English (default) sitemap has a few extraneous posts listed from the other languages, which are displayed in both the English as their lingual-specific sitemaps. This is what I was aiming for in my previous reply.

    Below you find an overview of the incorrectly listed posts I was able to find. I’d like you to check in on those posts’ settings (again), and see if they have their WPML options set correctly. And perhaps, saving the posts again will correct their language settings.

    The goal is that each sitemap only contains posts from its language so that the broken links (and their 404 errors) go away.

    Extraneous Dutch posts:


    Extraneous French posts:


    This one’s displayed in the English sitemap only, while it should be in the French one:


    Unfortunately, from here, I can’t tell why these misarrangement issues are happening on your site. If we can’t work it out with the information I’ve given thus far, then I recommend talking to the folk at WPML. They know the ins-and-outs of how WPML handles post queries much better than I 🙂 Then, if you will, please report back with the solution they’ve given. Thank you!

    Thread Starter pixeline


    Thank you @cybr for your thorought reply!
    Will triple check, eventually directly in the Database to understand how this.

    Would that solve the “weird number of items in the sitemap” issue too ?

    • This reply was modified 1 year, 6 months ago by pixeline.
    Plugin Author Sybre Waaijer


    No problem 🙂 Keep me posted and make a back-up of your database before you perform queries!!

    It’s best to use the admin interface, though, because when that doesn’t work, it’s indicative of a bug we must resolve.

    Now, when all posts have their language-settings corrected, the numbers should add up again. Typically, a sitemap would, for each language, have this tallied:
    homepage + page for posts + number of indexable posts/pages/cpt for that language.

    For completeness, that number is capped at 50,000 posts per sitemap, and that number should be at most: ( (sitemap query limit * 2) + homepage + page for posts ).
    The “* 2” is because TSF queries posts and pages separately.

    Thread Starter pixeline


    @cybr you were totally right: some weird stuff happened and I didn’t see it at first. We also use Divi builder alongside WPML (and TSF). Both tweak the UI so much that there is some confusion for our translators, so bogus pages where created. In fact all those errors in the English sitemap can be deleted. They are not the correct ones.

    We can safely close this issue as resolved 🙂

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘WPML: sitemap does not add the language string in URLs’ is closed to new replies.