WordPress.org

Ready to get started?Download WordPress

Forums

WP Hide Dashboard
[resolved] "Screen options" and "help" buttons are sill there (8 posts)

  1. dmitry.matora
    Member
    Posted 1 year ago #

    "Screen options" and "help" buttons are sill there (but inactive)
    I can guess you want to hide them as well, not just disable

    http://wordpress.org/extend/plugins/wp-hide-dashboard/

  2. Kim Parsell
    Volunteer Moderator
    Plugin Author

    Posted 1 year ago #

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

  3. Denis Lam
    Member
    Posted 1 year ago #

    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...

  4. Kim Parsell
    Volunteer Moderator
    Plugin Author

    Posted 1 year ago #

    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?

  5. Denis Lam
    Member
    Posted 1 year ago #

    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...

  6. Kim Parsell
    Volunteer Moderator
    Plugin Author

    Posted 1 year ago #

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

  7. Denis Lam
    Member
    Posted 1 year ago #

    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!

  8. Kim Parsell
    Volunteer Moderator
    Plugin Author

    Posted 1 year ago #

    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. :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic