Removing My Sites menu from Admin

I am trying to find a solution to remove the “My Sites” menu that comes under the Dashboard section of a multi-site install. Any ideas on which hook to use?

enter image description here

Related posts

1 comment

  1. You can use remove_submenu_page to remove it. Note that it doesn’t prevent visiting that page if you manually enter the URL.

    function adjust_the_wp_menu() {
        $page = remove_submenu_page( 'index.php', 'my-sites.php' );
    }
    add_action( 'admin_menu', 'adjust_the_wp_menu', 999 );
    

    Based on the example from remove_submenu_page Codex page.

Comments are closed.