Support » Plugin: Yoast SEO » Add subdirectory support for all links

  • Resolved bsteinlo


    I have a website that is using localization via Javascript. It generates subdirectories for each language and appends the language tag to the URL after the domain. For example, you can visit for Japanese, as well as for Korean. You can also visit posts, such as

    Google search console will fetch these and render them properly. Is there a way to add these subdirectories to my sitemap that is generated by Yoast to help with SEO?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Md Mazedul Islam Khan


    The Yoast SEO is currently compatible with the WPML multilingual plugin. So, we suggest you please switch to the WPML multilingual plugin to create a multilingual sitemap.

    That said you can add external links to the sitemap index by following the steps given in our this guide.

    Thread Starter bsteinlo


    Thanks @mazedulislamkhan. The link to the guide was exactly what I needed!

    I adjusted the function to include

    global $wpseo_sitemaps;
    $date = $wpseo_sitemaps->get_last_modified('post');

    and then use that for <lastmod>' . htmlspecialchars( $date ) . '</lastmod>

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Add subdirectory support for all links’ is closed to new replies.