Adding Custom URLs to Sitemap

#384035
Viewing 3 replies - 1 through 3 (of 3 total)
  • Nigel
    Rank Math business

    Hello,

    Thank you for contacting Rank Math for help with your multilingual sitemaps.

    Please refer to our guide on how to add custom URLs to the sitemap: https://rankmath.com/kb/filters-hooks-api-developer/#add-extra-urls-in-sitemap. You may need to check the Gtranslate documentation for how to retreive the translated URLs.

    Hope that helps. Please let us know if you have questions.

    I tried but did not get an idea about

    add_action( ‘rank_math/sitemap/{$type}_content’, function() {
    return ‘<url>
    <loc>https://rankmath.com/some-custom-url/</loc&gt;
    <lastmod>2020-06-10T20:20:20+00:00</lastmod>
    </url>’;
    });

    {$type} (is it possible to add product keyword?)
    <loc>https://rankmath.com/some-custom-url/</loc&gt; (What I’ve to replace on this URL?)
    https://templatetrip.com/fr/ (is it valid?)

    Hello,

    Yes, you can replace the placeholder {$type} with product.

    Adding the URL you mentioned for should be valid, however, if you wish to dynamically add the individual post’s translated URL, this will require you to create a logic that retrieves G-Translate’s all translated URLs and loop it in our filter code.

    Please contact the support folks from G-Translate on how to retrieve the translated URLs as instructed by my colleague in the previous reply.

    Looking forward to helping you on this one.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)

The ticket ‘Adding Custom URLs to Sitemap’ is closed to new replies.