MainWP Community

Remove Users in Sitemaps XML feature in WordPress 5.5

Remove users in 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_add_provider',
    function( $provider, $name ) {
        if ( 'users' === $name ) {
            return false;
        }
 
        return $provider;
    },
    10,
    2
);
2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.