Title: Custom Preload
Last modified: January 30, 2025

---

# Custom Preload

 *  Resolved [Hamed Sedaghat](https://wordpress.org/support/users/visualhost/)
 * (@visualhost)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/custom-preload/)
 * Hi Dear(s),
 * How can I use Custom sitemap for Preload? or exclude a sitemap from preloading?
 * in this case, I have sitemap by rankmath, and **I need product sitemap** because
   of SEO, so can not delete that sitemap
 * and also** I need product be cachable** by first visit, so can not exclude from
   caching
 * but about preload, I need to **exclude product from (only) preloading**, Because
   the number of products is very large and preloading takes a lot of time, so any
   product get first visit, then will cached
 * What is done in practice is:
 * I will clear part of cache via cron at midnight (00:01) for: homepage, shop, 
   product, product categories and nothing else
 * then I set preload for daily at 00:05 (by click save button at exactly that time),
   As a result preload start automaticly And I want everything to be preloaded except
   products.
 * with best wishes

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

 *  Plugin Support [vupdraft](https://wordpress.org/support/users/vupdraft/)
 * (@vupdraft)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/custom-preload/#post-18277973)
 * Hi,
 * Try using this for the sitemap
 * // Add a filter to ensure the new sitemap filename is used
 * add_filter( ‘wpo_cache_preload_sitemap_filename’, ‘set_custom_sitemap_filename’);
 * /**
 *  * Set a custom sitemap filename
 *  */
 * function set_custom_sitemap_filename( $filename ) {
 *     return ‘sitemap-test.xml’;
 * }
 * For the products, I am afraid you cannot currently exclude just the products,
   you would need to exclude the whole page.
 *  Thread Starter [Hamed Sedaghat](https://wordpress.org/support/users/visualhost/)
 * (@visualhost)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/custom-preload/#post-18278002)
 * its great
 * i will use custom sitemap and add **RankMath **sitemaps as I need inside custom
   sitemap
 * the custom sitemap will contain this:
 * [https://domain.com/page-sitemap.xml](https://domain.com/page-sitemap.xml)
 * [https://domain.com/post-sitemap.xml](https://domain.com/post-sitemap.xml)
 * [https://domain.com/product_cat-sitemap.xml](https://domain.com/product_cat-sitemap.xml)
 * so only page, post and product cat will preloading, True?
 *  Thread Starter [Hamed Sedaghat](https://wordpress.org/support/users/visualhost/)
 * (@visualhost)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/custom-preload/#post-18278036)
 * Yes, It worked fine.
 * We can put any sitemap we want inside this custom sitemap.
 * The advantage of this is that when the main sitemap is updated automaticly by**
   RankMath**, the custom sitemap will also be updated based on the latest changes.

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

The topic ‘Custom Preload’ is closed to new replies.

 * ![](https://ps.w.org/wp-optimize/assets/icon-256x256.png?rev=1552899)
 * [WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance](https://wordpress.org/plugins/wp-optimize/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-optimize/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-optimize/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-optimize/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-optimize/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-optimize/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Hamed Sedaghat](https://wordpress.org/support/users/visualhost/)
 * Last activity: [1 year, 3 months ago](https://wordpress.org/support/topic/custom-preload/#post-18278036)
 * Status: resolved