Hide “My Site” function on the admin bar and under the dashboard
-
Hi,
After created some sub sites, I found that the sub site’s admin can go to “Main Site” panel through “My Site”. I want to keep secret about my main site setting. Do you guys know how to hide the main site column under dashboard and toolbar(admin bar)?
I’ve searched a lot of information but I can’t find any ways to do it at the same time. I just found a code to hide “My Site” under the dashboard:
function adjust_the_wp_menu() { $page = remove_submenu_page( 'index.php', 'my-sites.php' ); } add_action( 'admin_menu', 'adjust_the_wp_menu', 999 );
The code works for me, but the code also hides “My Site” when I log in to Keymaster(Network Admin) account. I just want to hide “My Site” to all admin except Network Admin. Thanks
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Hide “My Site” function on the admin bar and under the dashboard’ is closed to new replies.