Support » Plugin: WP Hide Dashboard » [Plugin: WP Hide Dashboard] "Screen options" and "help" buttons are sill there

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor Kim Parsell

    (@kpdesign)

    WP Mom

    I’ve just released an update that takes care of that issue, along with several others. It’s available for download now.

    I see both screen options and help buttons still there on my network sites’ dashboards, all all functioning. Am I missing something? Is there a settings page I need to configure because I do not see a settings page either…

    Plugin Contributor Kim Parsell

    (@kpdesign)

    WP Mom

    There is no settings page. Once activated, the plugin just “works”.

    The only role that this hides anything from is subscribers. Admins/editors/authors/contributors will still see everything they are supposed to see per their role.

    The fact that you still see the dashboard means you are logged in as one of those roles.

    Have you tried logging in as a subscriber to see if screen options, help, and the dashboard are hidden?

    Also, did you network activate the plugin, or only activate it on one site?

    Thank makes sense. Thanks for the clarification! Any way to change it so that Admins also can’t see them? This may be useful in a Multisite network set up where you want to control what admins see…

    Plugin Contributor Kim Parsell

    (@kpdesign)

    WP Mom

    Why would you want to hide screen options and help from admins?

    Well actually, I guess I was trying to disable some dashboard widgets, so I should just focus on that and not hide the widgets…

    I found this: http://pario.no/2011/03/28/how-to-remove-dashboard-widgets-in-wordpress/

    Tweaked functions.php and it worked… just for SuperAdmin. The multisite dashboard widgets are still showing. Any clue?

    But thanks for the help!

    Plugin Contributor Kim Parsell

    (@kpdesign)

    WP Mom

    Don’t put it in your theme’s functions.php file. If you switch themes, you lose the functionality.

    Read this blog post: http://wphidedash.org/2011/04/best-practice-for-adding-custom-functions/

    It tells you how to create a custom plugin for these functions. Make sure you change the info in the plugin header to reflect your name and site URL.

    Now, for the code you need to add to that custom plugin to do this:

    /* Disable default dashboard widgets */
    
    function spiffy_disable_default_dashboard_widgets() {
    
    	if ( !is_super_admin() ) {
    		remove_meta_box( 'dashboard_right_now', 'dashboard', 'core' );
    		remove_meta_box( 'dashboard_recent_comments', 'dashboard', 'core' );
    		remove_meta_box( 'dashboard_incoming_links', 'dashboard', 'core' );
    		remove_meta_box( 'dashboard_plugins', 'dashboard', 'core' );
    		remove_meta_box( 'dashboard_quick_press', 'dashboard', 'core' );
    		remove_meta_box( 'dashboard_recent_drafts', 'dashboard', 'core' );
    		remove_meta_box( 'dashboard_primary', 'dashboard', 'core' );
    		remove_meta_box( 'dashboard_secondary', 'dashboard', 'core' );
    	}
    
    }
    
    add_action('admin_menu', 'spiffy_disable_default_dashboard_widgets');

    Be sure to remove the code from your functions.php file before activating the custom plugin.

    Notice that I’ve prefixed the function name with spiffy_ – that’s to keep it from conflicting with any other functions that might have the same name. It’s always best to do that. 🙂

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Plugin: WP Hide Dashboard] "Screen options" and "help" buttons are sill there’ is closed to new replies.