wp_sitemaps_enabled WordPress Filter Hook
The wp_sitemaps_enabled hook allows you to enable or disable sitemaps for your site. This can be useful if you want to disable sitemaps for a specific post type or taxonomy.
apply_filters( 'wp_sitemaps_enabled', bool $is_enabled ) #
Filters whether XML Sitemaps are enabled or not.
Description
When XML Sitemaps are disabled via this filter, rewrite rules are still in place to ensure a 404 is returned.
See also
Parameters
- $is_enabled
(bool)Whether XML Sitemaps are enabled or not. Defaults to true for public sites.
Source
Changelog
Version | Description |
---|---|
5.5.0 | Introduced. |