Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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

share|improve this question
    
You'll have to intercept the global for the wp admin menu. Give it a try and file an edit with how far you got. –  kaiser Feb 18 at 3:41

1 Answer 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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.