A WordPress-centric search engine for devs and theme authors



wp_get_sitemaps ›

Since5.5.0
Deprecatedn/a
wp_get_sitemaps ( No parameters )
Returns:
  • (WP_Sitemaps_Provider[]) Array of sitemap providers.
Defined at:
Codex:

Gets an array of sitemap providers.



Source

function wp_get_sitemaps() {
	$sitemaps = wp_sitemaps_get_server();

	if ( ! $sitemaps ) {
		return array();
	}

	return $sitemaps->registry->get_sitemaps();
}