Support » Fixing WordPress » Remove/block part of the dashboard

  • Hey everyone,

    I want to remove part of the dashboard for a client’s websites so they don’t install plug-in by themselves and maybe muck up WP.

    What I want to hide/remove are the Plugins, Word Press Blog and Other WordPress News sections, but the rest of the dashboard can remain.

    Anyone else done this, or want to do this?

    Am using v3.0.1

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Create a “mu-plugins” in your wp-content dir and add the following to a *.php file:

    <?php
    function ds_dashboard() {
    	if( current_user_can( 'read' ) ) {
    			remove_meta_box( 'dashboard_primary', 'dashboard', 'side' );
    			remove_meta_box( 'dashboard_secondary', 'dashboard', 'side' );
    		//	remove_meta_box( 'dashboard_incoming_links', 'dashboard', 'normal' );
    		//	remove_meta_box( 'dashboard_recent_comments', 'dashboard', 'normal' );
    		//	remove_meta_box( 'dashboard_right_now', 'dashboard', 'normal' );
    	}
    	if( current_user_can( 'edit_posts' ) ) {
    		//	remove_meta_box( 'dashboard_recent_drafts', 'dashboard', 'side' );
    		//	remove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' );
    	}
    	if( current_user_can( 'activate_plugins' ) ) {
    			remove_meta_box( 'dashboard_plugins', 'dashboard', 'normal' );
    	}
    }
    add_action( 'admin_head', 'ds_dashboard' );
    ?>

    Works perfectly!!!

    Thanks muchly!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Remove/block part of the dashboard’ is closed to new replies.