Edit (9/8/2011): This used to global $wp_meta_boxes
and then unset()
things from the array. NO MORE. Now we’ll do it the WordPress Way™ with remove_meta_box()
.
There are plenty of resources out there on customizing the usual WordPress Dashboard widgets, but not a whole lot (or maybe even anything beyond Xref) on the two additional screens WordPress multisite introduces: the Network Admin screen, available to superadmins, and the Global Dashboard screen, which is seen by users who have an account but are not assigned to a site or sites*. The hooks for these screens are wp_network_dashboard_setup
and wp_user_dashboard_setup
, respectively.
To clear out the Network Admin Dashboard (remove or comment out the lines for ones you do want to keep):
add_action('wp_network_dashboard_setup', 'hhs_remove_network_dashboard_widgets' ); function hhs_remove_network_dashboard_widgets() { remove_meta_box ( 'network_dashboard_right_now', 'dashboard-network', 'normal' ); // Right Now remove_meta_box ( 'dashboard_plugins', 'dashboard-network', 'normal' ); // Plugins remove_meta_box ( 'dashboard_primary', 'dashboard-network', 'side' ); // WordPress Blog remove_meta_box ( 'dashboard_secondary', 'dashboard-network', 'side' ); // Other WordPress News }
To clear out the Global Dashboard:
add_action('wp_user_dashboard_setup', 'hhs_remove_user_dashboard_widgets' ); function hhs_remove_user_dashboard_widgets() { remove_meta_box ( 'dashboard_primary', 'dashboard-user', 'normal' ); //WordPress Blog remove_meta_box ( 'dashboard_secondary', 'dashboard-user', 'normal' ); //Other WordPress News }
* In case you’re wondering how a user ends up logged in but not belonging to a site: sometimes you might bulk add users, especially when using another authentication system, or you might have materials available to anybody who’s logged into the network but doesn’t necessarily have to belong to a site. I’ve got a custom dashboard widget (using the same wp_user_dashboard_setup
hook) for Eastman’s Global Dashboard to hopefully un-confuse users (yes, the ghost of George Eastman is logged in).
Great post. However, being a newbie with WPMU, I’m having a hard figuring out where to put that code.
I am wanting to remove the “wordpress blog” and “other wordpress News” from my global dashboard.
Are you able to give detail instructions where?
Many thanks,
Tuan
LikeLike
Sorry for the delayed response – just moved and it’s been a crazy time!
The best place for you to put this would be into a functionality plugin that’s either network activated or in the mu-plugins folder, since this is for the network and you can’t count on a theme. WPCandy has a great walkthrough on creating one: http://wpcandy.com/teaches/how-to-create-a-functionality-plugin
LikeLike
[…] about multisite that I haven’t already, I’d like to highlight this post from Helen, on customizing the special multisite dashboards. A small thing that can bring great usability to your site if you have more than a couple users. […]
LikeLike
I just wanted to say that this article was immensely helpful. I really appreciate you sharing this because I was scouring the internet just for this.
Your right that there are a million articles explaining on how to customize the user dashboard but not the super admin network dashboard.
Again thank you. 🙂
LikeLike
I’m glad to hear that it helped you! You’re very welcome 🙂
LikeLike