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

  • Resolved bsteinlo

    (@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 http://www.test.com/ja for Japanese, as well as test.com/ko/ for Korean. You can also visit posts, such as http://www.test.com/ja/this-is-a-post.

    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

    (@mazedulislamkhan)

    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

    (@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.