Disable all of the sitemaps XML feature in WordPress 5.5 (11th August 2020) on your child site.
Snippet Type
Execute on Child Sites
Snippet
add_filter( 'wp_sitemaps_enabled', '__return_false' );
1 Like
phalancs
(Konstantin)
June 12, 2020, 4:35pm
4
Thanks I did not know this is coming.
1 Like
WordPress 5.5 release is on track for 11th August. There is no UI for being able to exclude posts from the sitemap, that will be on any existing SEO plugins. But there are filters to be able to exclude by post type.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
If you are using Yoast SEO or Jetpack plugins then the sitemaps XML feature in WordPress core will be already disabled.
Yoast SEO 14.5 is out! In this release, you'll bug fixes and enhancements. Plus, Yoast SEO Premium gets two new internal linking blocks.
Est. reading time: 5 minutes
Automattic:master
← Automattic:update/sitemap/WP55compat
opened 04:18AM - 18 Jun 20 UTC
Supports #15388
WordPress 5.5 adds a new default sitemap feature. While a fut… ure PR will investigate expanding upon that feature when 5.5 is our supported minimum, in the short term, we should short-circuit the Core sitemap to prevent duplicative sitemaps from loading.
This PR would disable the Core sitemap whenever the Jetpack sitemap modules is enabled. Since it is only adding a filter, this can land without version checks.
#### Changes proposed in this Pull Request:
* Disables the Core's sitemaps added via https://core.trac.wordpress.org/changeset/48072
#### Jetpack product discussion
p9dueE-1eG-p2
#### Does this pull request change what data or activity we track or use?
No.
#### Testing instructions:
* On WordPress nightly.
* Connected Jetpack with default modules.
* Visit example.com/wp-sitemap.xml and see Core's sitemap.
* visit example.com/robots.txt and see wp-sitemap.xml noted.
* Visit example.com/sitemap.xml and see the redirect to wp-sitemap.xml.
* Enable the Sitemaps module via Jetpack settings.
* Before this patch, all of the above will still happen except the sitemap.xml will show Jetpack's instead of redirecting. Notice that robots.txt include reference to both sitemaps.
* After the patch, confirm robots.txt only shows the Jetpack URL.
* After the patch, confirms that wp-sitemap.xml 404s.
* After the patch, confirm Jetpack sitemap still works.
#### Proposed changelog entry for your changes:
* Sitemaps: WordPress 5.5 Compatibility
Yoast SEO and Jetpack will start to use the sitemap XML feature in core and build on it once WordPress 5.6 is released.