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.

Clicking the screen options on dashboard, the drop down area has welcome checkbox. So even after hiding the welcome screen, if user chooses to display the welcome screen. It still shows.

Is there a way to hide this option completely and turn off the welcome screen? Or otherwise, a way to remove the welcome content completely and replace it with something else?

share|improve this question
    
You can hide the welcome screen with CSS but that is different of turn off the welcome screen, Just because something has in its CSS 'display: none' don't means that is not there. Turn off in the other hand just disable the whole thing, is no longer there. –  user983248 May 7 '12 at 10:11
add comment

4 Answers

up vote 3 down vote accepted

For WordPress 3.5+, adding remove_action( 'welcome_panel', 'wp_welcome_panel' ); to your functions.php removes the Welcome Panel from the Dashboard as well as its Screen Options menu.

See http://codex.wordpress.org/Plugin_API/Action_Reference/welcome_panel.

share|improve this answer
add comment

You can remove (turn-off) the Welcome screen by using any of these two options:

Single:

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

function hide_welcome_screen() {
    $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 );
}
?>

Multisite:

<?php
if ( ! defined( 'ABSPATH' ) || ! is_multisite() )
    return;
add_action( 'load-index.php', 'hide_welcome_screen_for_multisite' );

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

    if ( 2 == get_user_meta( $user_id, 'show_welcome_panel', true ) )
        update_user_meta( $user_id, 'show_welcome_panel', 0 );
}
?>

The state of the welcome panel is stored in a usermeta key that is global to the network. The value of 0 means the welcome panel should not be shown (and has been dismissed). The value of 1 means the welcome panel should be shown. (The initial user for a ingle-site WordPress install is given this value) . The value of 2 is specific to multisite, and means that the panel should only be shown if the user is the site owner.

Once dismissed, the panel can be shown by visiting the Screen Options tab.

I hope that helps.

share|improve this answer
    
I have these codes, but it only turn off the welcome overlay page, it does not remove the checkbox on the screen option. –  Sean Lee May 7 '12 at 14:35
1  
@SeanLee Then combine the two answers? Add the functions, and hide the checkbox using CSS. That should do a better job, I guess? –  its_me May 7 '12 at 14:53
    
As I've said I have those codes you gave already, and been using it. That's just not the answer to my question above. Thanks anyway. –  Sean Lee May 8 '12 at 3:01
add comment

You can hide the Welcome checkbox using some simple CSS:

[for="wp_welcome_panel-hide"] {
    display: none !important;
}

To add the CSS code to your WP-ADMIN pages, simply add this in your theme's functions.php file before the last ?>:

function my_custom_admin_head() {
        echo '<style>[for="wp_welcome_panel-hide"] {display: none !important;}</style>';
}

add_action('admin_head', 'my_custom_admin_head');

Note that I am using CSS3 selector in the code, I believe it works in IE7+ and newer.

PS: If you are already enqueuing a custom stylesheet file for WordPress Dashboard pages, obviously, you should add the CSS code in that CSS file. If not, I wouldn't bother creating one just for this code (1. it's not public facing, 2. unnecessary HTTP requests).

share|improve this answer
    
CSS only hide != than remove the whole thing && Turn-off != hidden. You can't use CSS to 'turn off' the welcome panel. I believe that is what the user is asking. –  user983248 May 7 '12 at 10:08
    
@user983248 I do understand that CSS is only cosmetic, and I do get your point. But cosmetic changes are sometimes enough, and it appears to be the case with the OP. –  its_me May 7 '12 at 10:31
    
Agree with both. I like the idea of completely removing it, however, if not wrong, that welcome screen was hardcoded in 2 files. If no way to remove it, then hiding it better than displaying it. So if anyone has the option to remove it using filter function, that'll be even better. –  Sean Lee May 7 '12 at 14:33
add comment

You can remove the panel and the checkbox for it by getting rid of the 'welcome_panel' action.

add_action( 'wp_dashboard_setup', 'remove_welcome_panel' );
function remove_welcome_panel() {
    global $wp_filter;
    unset( $wp_filter['welcome_panel'] );
}
share|improve this answer
1  
Please include some explanation with your code-- explain what this is doing and how it works. Thanks. –  s_ha_dum Mar 5 '13 at 2:24
    
Simple solution, which is nice. This worked on a multisite install for me. –  mhulse May 9 '13 at 19:58
add comment

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.