Manage URL of Numbers in Default WordPress Sitemap

Default Sitemap

WordPress’s default sitemap show 2000url in per sitemap, if you want to change or customize url list in Default sitemap. Follow simple steps in your wordpress theme’s.

How to change maximum

  • Find sitemaps.php in wp-include folder.
  • Change 2000 to according to your choice.

Exampe

function wp_sitemaps_get_max_urls( $object_type ) {
/**
* Filters the maximum number of URLs displayed on a sitemap.
*
* @since 5.5.0
*
* @param int $max_urls The maximum number of URLs included in a sitemap. Default 2000.
* @param string $object_type Object type for sitemap to be filtered (e.g. 'post', 'term', 'user').
*/
return apply_filters( 'wp_sitemaps_max_urls', 2000, $object_type );
}

Hope this article usful for you, Have and help on WordPress theme so contact me via contact us form.