Created
March 20, 2021 01:49
-
-
Save hegemanjr/24f7c5433551f6a9e7516ff9a5d9308c to your computer and use it in GitHub Desktop.
Hide user info from sitemap XML
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Hide user info from sitemap XML | |
add_filter( 'wp_sitemaps_add_provider', function ($provider, $name) { | |
return ( $name == 'users' ) ? false : $provider; | |
}, 10, 2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment