Administration Dashboard

I wrote a simple function for modifying the way the dashboard is shown for different user roles. For example I don’t want my subscribers too see all the system magic like stats:

// initiate the function
add_action( ‘wp_dashboard_setup’, ‘remove_dashboard_widgets’ );

function remove_dashboard_widgets() {

global $wp_meta_boxes;

// if a user cannot edit posts he or she will only see the latest comments
if ( ! current_user_can( ‘edit_posts’ ) ) {



// if a user cannot update the core he or she will not see
// the wordpress news on the dashboard

if ( ! current_user_can( ‘update_core’ ) ) {





More information on this can be found in the codex:


3 thoughts on “Administration Dashboard”

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s