• Resolved 1000camels

    (@1000camels)


    Yoast SEO seems to be adding a link to a translation of all languages for the homepage. However, we do not have that page. We are using translations only on specific pages. I need to find a way to remove these translations from page-sitemap.xml. They include:

    /zh-hans/
    /nl/
    /fr/
    /de/
    /it/
    /ko/
    /ru/
    /es/

    • This topic was modified 4 years, 1 month ago by 1000camels.

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Saša

    (@stodorovic)

    It’s an issue in WPML which uses the filter wpseo_sitemap_page_content to add all translations on the end of page-sitemap. You can use same filter to remove these pages.

    Did you try to install “glue” plugin Yoast SEO Multilingual?

    Thread Starter 1000camels

    (@1000camels)

    Thank you. This solved my problem. All I did was add the following hook:

    function init_hook() {
    // stop all languages from automatically being added to the sitemap
    add_filter( ‘wpseo_sitemap_page_content’, ‘__return_false’ );
    }
    add_action( ‘init’, ‘init_hook’ );

    Also, I am using Yoast SEO Multilingual, so perhaps that is what is adding this.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Links to non-existent translations in sitemap’ is closed to new replies.