Support » Plugin: Rank Math SEO - Best SEO Plugin for WordPress » Function to get sitemap url

  • Resolved Zoker

    (@zoker)


    Hi there,

    I’m trying to integrate your plugin with WP Rocket, but I’m not sure, what the correct method is to get the sitemap url.

    Yoast: WPSEO_Sitemaps_Router::get_base_url( 'sitemap_index.xml' );
    Seo Framework: the_seo_framework()->get_sitemap_xml_url();

    I tried
    RankMath\Modules\Sitemap\Router::get_base_url( 'sitemap_index.xml' ); but does not seem to work.

    So whats the correct function call?

    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello @zoker,

    Thank you for contacting the support.

    Can you please tell us if you are trying to enable the cache for the sitemap?

    If so, you do not need to, Sitemap has its inbuilt caching system.

    Please let us know your thoughts. Looking forward to helping you.

    Thread Starter Zoker

    (@zoker)

    Hello @mythemeshop

    No the integration will tell WP Rocket all the pages it needs to cache. So WP Rocket can read the sitemap and go through all the pages/posts and cache them.
    That’s why is need the URL

    You can see other integrations here:
    https://github.com/wp-media/wp-rocket/tree/master/inc/3rd-party/plugins/seo

    Hello @zoker

    Sorry for the confusion. Are you talking about a setting like this?
    https://mythemeshop.d.pr/BRH8Sf

    If so, we have emailed WP Rocket for the same and it shall be added soon to the plugin.

    We seek your patience and understanding in this matter. Thank you.

    Thread Starter Zoker

    (@zoker)

    Yes exactly šŸ™‚

    BTW you can easily open a PR in their repo instead of mailing them šŸ˜‰

    But nice that you added it that fast!

    Hello @zoker,

    Thank you. We have submitted the code to them and they were quick to reply.

    In one of the upcoming updates of WP Rocket, you would notice the compatibility.

    Hope that helps. If you have any further question(s), please let us know.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Function to get sitemap url’ is closed to new replies.