6

I have tried various versions of this here:

unset($wp_meta_boxes['dashboard']['normal']['high']['dashboard_wp_welcome_panel']);
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_wp_welcome_panel']);
unset($wp_meta_boxes['dashboard']['normal']['core']['wp_welcome_panel']);
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_welcome_panel']);
unset($wp_meta_boxes['dashboard']['normal']['core']['welcome_panel']);

I have tried looking this up but as there is not much documentation (there is but there isn't ) on it yet it is kind of hard.

I was wondering if someone could please help me out. I would really appreciate it. Thanks. :)

2 Answers 2

4

If you're using multisite, there's a plugin you can network activate to disable the welcome panel on all new sites. It's aptly named "Hide Welcome Panel for Multisite."

If you just want to do this for a typical (single site) installation, it's also pretty easy. The welcome screen is shown for a user if a specific meta key is set. So, add the following to a plugin and activate it ...

add_action( 'load-index.php', 'hide_welcome_panel' );

function hide_welcome_panel() {
    $user_id = get_current_user_id();

    if ( 1 == get_user_meta( $user_id, 'show_welcome_panel', true ) )
        update_user_meta( $user_id, 'show_welcome_panel', 0 );
}

This code is adapted directly from the above-mentioned plugin, but I haven't had a chance to personally test it ...

4
  • Hey thank you EAMann! This works awesomely. I just added it into my network wide multi site plugin that I have set up for network wide customizations. Again thank you this is what I was looking for.
    – Nicole
    Commented Dec 14, 2011 at 16:00
  • 1
    You should use the Hide Welcome Panel for Multisite plugin instead. The code from EAMann isn't effective for multisite, and will have some side effects on single-site. Commented Dec 15, 2011 at 16:26
  • 1
    @AndrewNacin Note that I linked to your plugin first and only included the extra code for non-multisite uses ... :-)
    – EAMann
    Commented Dec 15, 2011 at 17:09
  • 1
    With the code above users can still turn on the "Welcome panel" in the screen options on the dashboard. See @bjorsq's answer for a solution Commented Mar 18, 2013 at 14:20
5

@EAMann's solution hides the welcome panel from all users, but still allows the panel to be turned back on in the screen options. My solution, which should work in any installation (single or multisite), will remove it completely:

add_action( 'load-index.php', 'remove_welcome_panel' );

function remove_welcome_panel()
{
    remove_action('welcome_panel', 'wp_welcome_panel');
    $user_id = get_current_user_id();
    if (0 !== get_user_meta( $user_id, 'show_welcome_panel', true ) ) {
        update_user_meta( $user_id, 'show_welcome_panel', 0 );
    }
}

This removes the welcome panel action, which removes the welcome panel from the dashboard altogether. It then sets the user preference to hide the welcome panel for good measure. FYI, the preference can be set to 0 (hide), 1 (show or single site creator) or 2 (multisite site owner).

3
  • Thank you for this alternative. This will work great if you want to give your users the option to turn it on or off themselves.
    – Nicole
    Commented Nov 1, 2012 at 12:59
  • 2
    This solution will remove it altogether - if you want users to be able to turn it on and off, remove the remove_action('welcome_panel', 'wp_welcome_panel'); line from the function.
    – bjorsq
    Commented Nov 1, 2012 at 15:15
  • Ahh yes I'm sorry I misread your answer. Still though thank you for this alternative. :)
    – Nicole
    Commented Nov 1, 2012 at 17:31

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