• Resolved arazsalahli

    (@arazsalahli)


    I have multilingual website with three languages. The posts are enabled to appear on the search results from Search Appearences and the translations of blog page (except the one in the main language) are disabled for search results from Advanced tab. When I check post sitemap (https://www.parlat.az/post-sitemap.xml), I expect to only see the blog page which is in the main language but I also see the translated versions. So, although the translated versions of the blog page are marked with noindex from Advanced tab, they still show up in post XML. When I submit the sitemap to the search engine, the translated versions also show up in the search results.

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hi @arazsalahli,

    We see that there is a /blog/ page as well as multiple other URLs in the post sitemap. Can you also let us know which multilingual plugin you’re using on your site?

    Does setting the “Show in search results” option to “No” remove the URL from the post sitemap? You can find this option in the post edit screen under “Advanced” in the Yoast SEO metabox.

    If you’ve done this already, can you send us with a link to a screenshot that shows the problem?

    Thread Starter arazsalahli

    (@arazsalahli)

    Hi Priscilla,

    Thanks for the comments.

    I am using WPML plugin for translating my website. You see 4 URLs in the sitemap. 1 – Azerbaijani translation (nelumat) of blog page which is allowed for search results from Advanced tab, 2 – Azerbaijani translation of published post which is also allowed for search results (Russian and English are not allowed and they are not showing under XML as expected), 3 – English translation of blog page which is not allowed for search results from Advanced tab (noindex) but still appear under post XML, 4 – Russian translation (Информация) of blog page which is again not allowed for search results from Advanced tab (noindex) but still appear under post XML.

    Screenshot for 3 ( English translation of blog page) – https://paste.pics/AGYQG
    Screenshot for 4 (Russian translation of blog page) – https://paste.pics/AGYPX

    Sa?a

    (@stodorovic)

    WPML uses the hook wpseo_sitemap_post_content (plugin Yoast SEO Multilingual) to add translations for blog page (post archive). All translations for blog page (which is “special page” in WP) get “noindex tag” from “original blog page”. So, you can’t exclude translations for particular languages without PHP code (you can use previous filter to remove translated blog pages). Basically, it’s an issue in the plugin Yoast SEO Multilingual (add_languages_to_sitemap should check “noindex tag” for each translations).

    PS: If I find spare time, I’ll try to make PHP snippet which you can use to resolve this issue.

    Plugin Support Michael Ti?a

    (@mikes41720)

    Hi,

    Just to confirm, the expectation would be that https://www.parlat.az/melumat/ would show up in the post sitemap.

    The English translation https://www.parlat.az/en/blog/ is set to ‘noindex’as per your screenshot, so it shouldn’t show up in the post sitemap.

    The Russian translation https://www.parlat.az/ru/%d0%b8%d0%bd%d1%84%d0%be%d1%80%d0%bc%d0%b0%d1%86%d0%b8%d1%8f/ is also set to ‘noindex’ as per your screenshot, so it also shouldn’t show up in the post sitemap. Is this the correct description of your issue?

    Could you confirm what versions of Yoast SEO for WordPress and WPML you are using? Do you also have the Yoast SEO Multilingual glue plugin (from WPML) installed?

    Could you also check if the sitemap isn’t cached — https://yoast.com/help/sitemap-does-not-update/

    Could you also perform a conflict check to see if there isn’t any other of your plugins or themes that could possibly be causing this issue — https://yoast.com/help/how-to-check-for-plugin-conflicts/

    Thread Starter arazsalahli

    (@arazsalahli)

    Sa?a,

    I would appreciate if you make a PHP snippet to solve this issue. Thanks for explaining the source of the problem.

    Sa?a

    (@stodorovic)

    It looks that you want to keep only Azerbaijani translation (primary language). In this case there is simple solution to remove all translations of the blog page (which WPML adds at the end of post sitemap):

    add_filter( 'wpseo_sitemap_post_content', '__return_empty_string', 20 );

    If you need to keep some translation then the solution will be more complex.

    Thread Starter arazsalahli

    (@arazsalahli)

    Sa?a,

    As you mentioned, I only wanted to keep the Azerbaijani translation of the blog page, so the snippet worked for me. Thanks a lot for support.

    Plugin Support devnihil

    (@devnihil)

    Thanks for confirming that the snippet worked. We are going ahead and marking this issue as resolved but please let us know if you require any further assistance.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Post XML problem’ is closed to new replies.