Plugin Author
freemp
(@freemp)
Good point, thanks!
What about adding this as well …. ?
add_filter( 'wp_sitemaps_register_providers',
function( $providers ) {
unset( $providers['users'] );
return $providers;
} );
I can’t find the hook wp_sitemaps_register_providers
in the documentation.
Plugin Author
freemp
(@freemp)
Plugin Author
freemp
(@freemp)
I was just creating a test site with a test user on wordpress.com just to see its sitemap. From what I see, there are no users listed. Could it be that the users provider is disabled by default?
Make sure Discourage search engines from indexing this site is not set from Settings :: Reading :: Search engine visibility. Then by default a sitemap is rendered at /wp-sitemap.xml
, listing the users provider. Enabling your plugin does not hide this entry. I just checked in a brand new site with the preinstalled theme and no other plugins.
We want the sitemap, but I claim that the users provider is not relevant when your plugin is activated.
Plugin Author
freemp
(@freemp)
I was setting up a new local test site and was able to reproduce what you described above.
I also agree that the users section should not be rendered with the plugin activated. So I will soon publish a new version of the plugin with your suggestion included.
Thanks again for reporting!