Anyway to hook into SmartCrawl to add custom URL's to the sitemap like Yoast

Hello All,

In Yoast there were hooks to add URL’s to the sitemap if you didn’t have Custom Post Types to work with. Is there a similar hook for SmartCrawl?

Looked at the code but only hook I see is for the admin_init.



  • Andy
    • Product Design Lead

    Hi Jw,

    You can do this using the UI currently. Navigate to your site and add the slug /wp-admin/admin.php?page=wds_sitemap . Once you’re there, there’s a section called Extra URLs where you can add custom URLs not part of normal WP output.

    In terms of a hook, I’ve pinged a developer to check if there’s something available :grin:



    • LendUs
      • New Recruit

      Yeah this is manual process which as a programmer I hate. We have branches and loan advisors that change, get added, deleted moved etc…

      Unfortunately these weren’t created as Custom Post Types or it wouldn’t be an issue for SmartCrawl.

      With Yoast we had wpseo_sitemap_providers and wpseo_sitemap_index etc…

      I can generate the URL’s fine from the Db entries but a manual process is no bueno.

      Maybe a filter for extra URL’s :slight_smile:

      add_filter(‘wpmudev_seo_extra_urls’, ‘my_extra_urls’:wink:;

      Then in Smartcrawl_Xml_Sitemap::set_extra_urls

      return update_option( self::EXTRAS_STORAGE, array_filter( array_unique( apply_filters(‘wpmudev_seo_extra_urls’, $extras) ) ) );

      Thanks for the reply though.

      • Tony G
        • Mr. LetsFixTheWorld

        For anyone who expressed enthusiasm for the SIG in our DOTW, what LendUs just did there is exactly what we’ll be doing in the SIG to extend plugins:

        1) Hey, wouldn’t it be cool if plugin Foo could load some Stuff when Blah happens?

        2) Yeah, how about apply_filters(‘wpmudev_foo_blah’,stuff) ?

        3) Let’s do it! That line will go after after line 999 in program Foo.php.

        4) We need someone to write a hook to test that.

        5) We need someone else to document this.

        6) We’ll patch our version of plugin Foo with it, do some testing, check the doc.

        7) Submit to Dev.

        8) Wait for Dev to publish a new release with the change.

        9) Enjoy the fruit of our labor.

        10) No, there is no 10, go back to 9 and enjoy. :slight_smile:

  • Dimitris
    • Support Star

    Hey there all! :slight_smile:

    We just had some feedback from our developers on this.

    All extra URLs are loaded from the option wds-sitemap-extras and we can easily filter this option to include custom URLs like this:

    add_filter('option_wds-sitemap-extras', 'add_custom_urls');

    Warm regards,


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.