WordPress Dashboard is the first screen you see when you login to your wordpres blog. Using WordPress Dashboard you can control your posts,comments,users. In this post i added some code snippets which are useful to arrange,style or add new dashboard widgets.

Change WordPress dashboard colors

If you want to change your dashboard colors then add following code in your theme’s functions.php file

function custom_colors() {
echo '<style type="text/css">#wphead{background:#069}</style>';
}
add_action('admin_head', 'custom_colors');

Add Custom Dashboard widgets to WordPress dashboard

If you want to add custom dashboard widgets then add following lines of code in your theme’s functions.php Using this code snippet you can add your own wordpress dashboard widgets.

function example_dashboard_widget_function() {
// Display whatever it is you want to show
echo "Hello World, I'm a great Dashboard Widget";
} 
// Create the function use in the action hook
function example_add_dashboard_widgets() {
wp_add_dashboard_widget('example_dashboard_widget', 'Example Dashboard Widget', 'example_dashboard_widget_function');
}
// Hoook into the 'wp_dashboard_setup' action to register our other functions
add_action('wp_dashboard_setup', 'example_add_dashboard_widgets' );

Source : Wp Codex
Source

Remove dashboard widgets

If you don’t want some wordpress widgets on your dashboard then you can remove them from your dashboard using following code snippet. Add following lines of code in your theme’s functions.php file

function example_remove_dashboard_widgets() {
// Globalize the metaboxes array, this holds all the widgets for wp-admin
global $wp_meta_boxes;
// Remove the incomming links widget
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);	
// Remove right now
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);
unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);
unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);
}
// Hoook into the 'wp_dashboard_setup' action to register our function
add_action('wp_dashboard_setup', 'example_remove_dashboard_widgets' );

Disable the please update now message in WP dashboard

If you don’t want to display update notice message on your wordpress blog then add following lines of codes in functions.php file.

if ( !current_user_can( 'edit_users' ) ) {
add_action( 'init', create_function( '$a', "remove_action( 'init', 'wp_version_check' );" ), 2 );
add_filter( 'pre_option_update_core', create_function( '$a', "return null;" ) );
}

Add your own wordpress dashboard logo

If you want to add your own dashboard logo then add following lines of code in functions.php

add_action('admin_head', 'my_custom_logo');
function my_custom_logo() {
echo '
<style type="text/css">
#header-logo { background-image: url('.get_bloginfo('template_directory').'/images/your-logo.jpg) !important; }
</style>
';
}

Replace your-logo.jpg with your logo image name. and upload that inside images folder of your theme.
Source: Smasing Magazine.

WordPress Remove menus in wp dashboard

Following code will remove all the menus which are added in $restricted array

function remove_menus () {
global $menu;
$restricted = array(__('Dashboard'), __('Posts'), __('Media'), __('Links'), __('Pages'), __('Appearance'), __('Tools'), __('Users'), __('Comments'));
end ($menu);
while (prev($menu)){
$value = explode(' ',$menu[key($menu)][0]);
if(in_array($value[0] != NULL?$value[0]:"" , $restricted)){unset($menu[key($menu)]);}
}
}
add_action('admin_menu', 'remove_menus');

Source: hungred