8 Steps to a Spotless WordPress Dashboard

8 Steps to Cleaning Your WordPress Dashboard

I can be a bit of a neat freak at times. However, that cannot be said of my blog’s WordPress dashboard in the past. Random meta boxes and superfluous menu items abounded.

However, change was put in motion when I found a little code snippet that could remove menu items from my admin sidebar. The before and after was heartening:

Before and After

Now only if certain plugins didn’t feel that they were worth of their own main menu spot.

At that point, I was hooked. I subsequently went on a journey to make my dashboard as clean and presentable as possible. Part of this was the latent neat freak part of my character emerging, but I also knew that a clean dashboard would be far easier to navigate and use.

So I got to work in finding every single dashboard cleansing tip, snippet and plugin that I could find. The end result was a minimalistic nirvana:

WordPress Dashboard

I would say “Spot the differences”, but I’m about to reveal them all.

I’m presented only with what I need to see – nothing more, nothing less. Today, I want to share with you the various ways in which I have tidied up my own WordPress dashboard.

As always, I recommend that you use the Code Snippets plugin to keep things organized.

1. Change the Standard WordPress Greeting

If “Howdy” isn’t in your vocabulary, you may not be a big fan of the standard WordPress admin greeting:

Howdy

Fortunately, changing the greeting is a piece of cake with the following code snippet:

  1. add_action( 'admin_bar_menu', 'wp_admin_bar_my_custom_account_menu', 11 );
  2.  
  3. function wp_admin_bar_my_custom_account_menu( $wp_admin_bar ) {
  4. $user_id = get_current_user_id();
  5. $current_user = wp_get_current_user();
  6. $profile_url = get_edit_profile_url( $user_id );
  7.  
  8. if ( 0 != $user_id ) {
  9. /* Add the "My Account" menu */
  10. $avatar = get_avatar( $user_id, 28 );
  11. $howdy = sprintf( __('Welcome, %1$s'), $current_user->display_name );
  12. $class = empty( $avatar ) ? '' : 'with-avatar';
  13.  
  14. $wp_admin_bar->add_menu( array(
  15. 'id' => 'my-account',
  16. 'parent' => 'top-secondary',
  17. 'title' => $howdy . $avatar,
  18. 'href' => $profile_url,
  19. 'meta' => array(
  20. 'class' => $class,
  21. ),
  22. ) );
  23.  
  24. }
  25. }
add_action( 'admin_bar_menu', 'wp_admin_bar_my_custom_account_menu', 11 );

function wp_admin_bar_my_custom_account_menu( $wp_admin_bar ) {
$user_id = get_current_user_id();
$current_user = wp_get_current_user();
$profile_url = get_edit_profile_url( $user_id );

if ( 0 != $user_id ) {
/* Add the "My Account" menu */
$avatar = get_avatar( $user_id, 28 );
$howdy = sprintf( __('Welcome, %1$s'), $current_user->display_name );
$class = empty( $avatar ) ? '' : 'with-avatar';

$wp_admin_bar->add_menu( array(
'id' => 'my-account',
'parent' => 'top-secondary',
'title' => $howdy . $avatar,
'href' => $profile_url,
'meta' => array(
'class' => $class,
),
) );

}
}

Obviously, you should substitute the “Welcome” text buried within that code with whatever takes your fancy.

Source: How to Change the Howdy Text in WordPress 3.3 Admin Bar

2. Remove Sidebar Menu Items

This is of course the code snippet that started my dashboard cleaning obsession:

  1. function remove_admin_menu_items() {
  2.     $remove_menu_items = array(__('Links'));
  3.     global $menu;
  4.     end ($menu);
  5.     while (prev($menu)){
  6.         $item = explode(' ',$menu[key($menu)][0]);
  7.         if(in_array($item[0] != NULL?$item[0]:"" , $remove_menu_items)){
  8.         unset($menu[key($menu)]);}
  9.     }
  10. }
  11.  
  12. add_action('admin_menu', 'remove_admin_menu_items');
function remove_admin_menu_items() {
	$remove_menu_items = array(__('Links'));
	global $menu;
	end ($menu);
	while (prev($menu)){
		$item = explode(' ',$menu[key($menu)][0]);
		if(in_array($item[0] != NULL?$item[0]:"" , $remove_menu_items)){
		unset($menu[key($menu)]);}
	}
}

add_action('admin_menu', 'remove_admin_menu_items');

Fiddle with the above snippet appropriately and you can remove any menu item from your sidebar. Check out the full post I wrote for all of the details.

3. Change the Footer

Whilst the footer is very polite…

Footer

You’re welcome!

…perhaps it’s about time you switched it up to something more uplifting:

Custom Footer

Doing so is a piece of cake with the following code snippet:

  1. function remove_footer_admin () {
  2.     echo "Your own text";
  3. }
  4.  
  5. add_filter('admin_footer_text', 'remove_footer_admin');
function remove_footer_admin () {
    echo "Your own text";
} 

add_filter('admin_footer_text', 'remove_footer_admin');

Source: WordPress tip: How to change the dashboard footer text

4. Remove Unwanted Widgets

As standard, WordPress sticks a whole load of widgets on your dashboard that you will never want or use:

Meta Boxes

Thanks, but I already have an RSS feed reader.

Fortunately, getting rid of them is pretty damn easy. Just open up the “Screen Options” tab at the top right of your admin screen, and uncheck the boxes that you don’t want to see. Whilst you’re at it, select an appropriate number of columns to suit the meta boxes you do choose to keep:

Screen Options

Once you’ve done this, your dashboard will actually be a useful source of information, as opposed to a jumbled mess of nonsense.

5. Add Custom Widgets

How about adding something of substance to your dashboard, like a collection of relevant links you regularly like to access?

Custom Widget

Creating your own dashboard widgets is a piece of cake. Just use this simple short code:

  1. function my_custom_dashboard_widgets() {
  2. global $wp_meta_boxes;
  3.  
  4. wp_add_dashboard_widget('custom_help_widget', 'My Widget Title', 'custom_dashboard_help');
  5. }
  6.  
  7. function custom_dashboard_help() {
  8. echo 'My widget content';
  9. }
  10.  
  11. add_action('wp_dashboard_setup', 'my_custom_dashboard_widgets');
function my_custom_dashboard_widgets() {
global $wp_meta_boxes;

wp_add_dashboard_widget('custom_help_widget', 'My Widget Title', 'custom_dashboard_help');
}

function custom_dashboard_help() {
echo 'My widget content';
}

add_action('wp_dashboard_setup', 'my_custom_dashboard_widgets');

Obviously, you’ll want to change the title of the widget and the contents to suit. Once you’re finished, the widget will appear on your dashboard, and you’ll be able to move it around like any other.

Source: 12 Useful Customization and Branding Tweaks for the WordPress Dashboard

6. Remove Screen Options and Help Tabs

Now that you’ve tamed your widgets, you have no need for that Screen Options tab. And let’s be honest, if you’ve been using WordPress for more than a few weeks, that Help tab hasn’t seen any action in some time. So why not get rid? Just use the following pair of code snippets:

  1. function remove_screen_options_tab()
  2. {
  3.     return false;
  4. }
  5. add_filter('screen_options_show_screen', 'remove_screen_options_tab');
  6.  
  7. function hide_help() {
  8.     echo '
function remove_screen_options_tab()
{
    return false;
}
add_filter('screen_options_show_screen', 'remove_screen_options_tab');

function hide_help() {
    echo '
  1. '; } add_action('admin_head', 'hide_help');
'; } add_action('admin_head', 'hide_help');

Source: WP-Snippets

7. Disable Update Reminders

We all know that you should keep your WordPress installations up to date, but I’m not going to judge. Sometimes there is a genuine reason why you should not or cannot update, and that update reminder can get rather irritating after a while.

Fortunately, you can get rid of it permanently by using the following code snippet:

  1. if ( !current_user_can( 'edit_users' ) ) {
  2.   add_action( 'init', create_function( '$a', "remove_action( 'init', 'wp_version_check' );" ), 2 );
  3.   add_filter( 'pre_option_update_core', create_function( '$a', "return null;" ) );
  4. }
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;" ) );
}

Source: How to: Disable the “please update now” message in WP dashboard

8. Floating Admin Menu

Finally, we have a favorite of mine. The Floating Admin Menu plugin does exactly as you would expect – floats the admin menu. The plugin’s developer even went to the trouble of making a video to show you:

As you can see, this plugin comes in handy on any page where you find yourself scrolling.

What About You?

So there you have it folks – a selection of tips and tricks that I use to keep my WordPress dashboard fresh and clean. Do you have any similar code snippets or plugins to share with us? Let us know in the comments section!

Creative Commons photo courtesy of Daquella manera

Access, manage, update and backup all your WordPress sites from one powerful dashboard

Sign up - it's free!
post a comment

3 Comments

  1. I'm not a techie, but I need to change my widget names to match my sidebars. A web designer who was not a WordPress expert, renamed them and I once lost one half of my entire website. It just disappeared. A programmer who I respect, told me last year, not to try to do it because it could cause big problems. Your recommendation would be greatly appreciated. It would appear to be an easy fix, but after losing much of my website TWICE, I'm afraid to try unless there have been updates that have resolved the issue. Your thoughts?

  2. Your Snippet " Remove Help Tabs" Helped me Alot, I found it after 6 hours of search, I couldn't believe that a Paid Service Provider can provide such a useful resource. :)