User/Global/Network Admin Dashboard (4 posts)

  1. IKTP
    Posted 5 years ago #

    I need to add a custom dashboard widget and remove other widgets to my multisite. i.e. to remove some widgets from the dashboard for each site I add this to my functions.php:

    function remove_dashboard_widgets() {
    	global $wp_meta_boxes;
    add_action('wp_dashboard_setup', 'remove_dashboard_widgets');

    But for a multisite the network admin has another dashboard, and when users register for my site (they register for all blogs) they see a global dashboard and these widgets dont get removed.

    Can someone please help me figure out where to add the code to remove these widgets from network admin and from the user/global dashboard and also if the code needs to be changed at all.


  2. KatieBen
    Posted 5 years ago #

    Here's how I'm removing dashboard widgets:

    [Code moderated as per the Forum Rules. Please use the pastebin]

    Hope this helps :)

  3. Curtiss Grymala
    Posted 5 years ago #

    Also, if you're planning to do this on a global level, you'll probably want to put the code into a PHP file and upload it to wp-content/mu-plugins rather than trying to replicate the code in (potentially) multiple themes.

Topic Closed

This topic has been closed to new replies.

About this Topic