# Hide "My Sites" From Regular Users

> Removes the My Sites menu from the toolbar for everyone except super admins, so members of several sites are not distracted by the network structure.

- Type: PHP
- Runs: Run everywhere
- Category: [Multisite](https://wpide.com/library/category/multisite/)
- Tags: admin-bar, my-sites, users
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/ms-hide-my-sites-for-non-super-admins/

## Code

```php
if ( ! is_multisite() ) {
    return;
}

add_action( 'admin_bar_menu', function ( $bar ) {
    if ( ! is_super_admin() ) {
        $bar->remove_node( 'my-sites' );
    }
}, 999 );
```

## Notes

Users can still reach their other sites by address.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Hide "My Sites" From Regular Users" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
