.. Your Daily Design Dosis

Customize your WordPress Dashboard

| 35 Comments

The WordPress Dashboard may look a bit overwhelming to the newbie blogger. The dashboard is a very important part of a WordPress blog. In fact, it allows you to control your posts, your blog design, and many more things.

The WordPress Dashboard can be modified in many ways. Over the years, the dashboard has evolved into a highly flexible information portal, containing all the main components of your site. On the left side of your WordPress dashboard you can find the user interface of the WordPress admin area (Admin links), and on the right providing data on information about your blog’s recent comments, plugin updates, recent drafts,  etc.

There are loads of dashboard hacks and plugins out there to change the default functionality of your dashboard into just about anything, or even disable it completely. For most of these hacks to work correctly you need to insert some code in – what WordPress developers call – the “functions file”, which resides in your theme subdirectory and is named functions.php.

Note: – Let me please state that the hacks described here work fine in WordPress 2.9.2, how they work in the 3.0 series I really don’t know? Some of these hacks I recently found on other blogs (see: resources & credits – at the bottom of this article) and embedded into my blog. Please backup your theme before attempting any hacks so you can restore things if something goes wrong.

Change WordPress dashboard colors

Ever wanted to change the WordPress dashboard colors (as well as font or even display) without having to edit WordPress core files, than you’ll like this hack for sure. You can easily add as many styles as you wish within the <style> and </style> tags.

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

Define your own login logo

Although it doesn’t have any importance for the blog performance or usability, most clients will be very happy to see their own logo on the dashboard login page, instead of the classic WordPress logo. The following hack that you just have to paste in your functions.php file.

/* Define your own login logo */
function my_custom_login_logo() {
echo '<style type="text/css">
h1 a { background-image:url('.get_bloginfo('template_directory').'/images/logo.png) !important; }
</style>';
}
add_action('login_head', 'my_custom_login_logo');

wordpress-code-snippets

Replace dashboard logo with yours

Just as a client will love to see their own logo on WordPress login page, there’s no doubt that they’ll enjoy viewing it on the dashboard too. Simply copy the code below and paste it to your functions.php file.

/* Replace dashboard logo with yours */
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/thumb-logo.png) !important; }</style>';
}

Disable the “please upgrade now” message

WordPress constantly release new versions. Although for obvious security concerns you should always upgrade; disabling the “Please upgrade now”message on client sites can be a good idea because the client doesn’t necessarily have to know about this, this is a developer’s job. One more time, nothing hard: paste the code in your functions.php, save it, and it’s all good.

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;" ) );
}

Remove dashboard widgets according to user role

If you’re owning a multi-user blog, it may be useful to know how to hide some dashboard widgets to keep confidential information in a safe place. The following code will remove the postcustom meta box for “author” (role 2). To apply the hack on your own blog, just copy the code below and paste it in your functions.php file.

function customize_meta_boxes() {
//retrieve current user info
global $current_user;
get_currentuserinfo();

//if current user level is less than 3, remove the postcustom meta box
if ($current_user->user_level < 3)
remove_meta_box('postcustom','post','normal');
}
add_action('admin_init','customize_meta_boxes');

Disallow theme switching

If you’ve created WordPress themes for your clients you could encounter the following problem: The client “explored” the WordPress dashboard and “accidentally” switched the theme.

Using WordPress actions, we can easily remove the “themes” menu and consequently prevent the risk of having a client switching the theme. The code below just has to be pasted in your functions.php. The “themes” menu will be removed once the file is saved.

/*Remove theme-menus*/
add_action('admin_init', 'remove_theme_menus');
function remove_theme_menus() {
global $submenu;
unset($submenu['themes.php'][5]);
unset($submenu['themes.php'][15]);
}

Modify WordPress dashboard footer text

Another good tip for those who create WordPress themes for clients is to modify the WordPress dashboard footer text, and add (for example) a link to your support forum. The only thing you have to do is to copy this code and paste it in functions.php:

/* Change the Footer in WordPress Admin Panel */
function remove_footer_admin () {
echo "Your own text";
}

add_filter('admin_footer_text', 'remove_footer_admin');

Provide help messages

If you’re building a site for a client and they have some problems with some parts of the dashboard, a good idea is to provide contextual help to the client. The following hack will allow you to add a custom help messages for the blogadmin. As usual, you only have to paste the code into your functions.php file.

function my_admin_help($text, $screen) {
// Check we're only on my Settings page
if (strcmp($screen, MY_PAGEHOOK) == 0 ) {
$text = 'Here is some very useful information to help you use this plugin...';
return $text;
}
// Let the default WP Dashboard help stuff through on other Admin pages
return $text;
}
add_action( 'contextual_help', 'my_admin_help' );

Disable WordPress From Auto-Saving Posts

As you type a post in the dashboard, WordPress periodically saves the content. This is a useful feature, but sometimes you may want to disable it. To disable WordPress’ auto-saving functionality, simply open the functions.php file and paste the following function:

function disableAutoSave(){
wp_deregister_script('autosave');
}
add_action( 'wp_print_scripts', 'disableAutoSave' );

Admin Drop down Menu [Plugin]

And last but not least, it’s not a hack but a plugin. Admin Drop down Menu is one of the best WordPress plugins to change the default user interface of WordPress admin area. The plugin replaces all the admin links with super charged and beautiful horizontal CSS drop down menu. The plugin also saves you from unnecessary clicks to expand the menu and enhances your productivity.

The plugin comes with a comprehensive options page. You can change the color schemes of drop down menu and to make the plugin faster, you can also disable the supported icons for each admin link. An interesting feature is compact mode which only shows icons for top links and saves space in the drop down menu. The following screen shot elaborates this feature.

Conclusion

If you are making websites for clients, based on a WordPress platform, you can easily change the default functionality of the WordPress dashboard by using the above hacks and plugin into a complete customized version. In an earlier article here on the gonzoblog I wrote about other WordPress-hacks: My favorite Hacks for WordPress

Resources & Credits:

 

Author: Jan Rajtoral

Jan Rajtoral AKA Gonzo the Great is the Founder of and Designer at gonzodesign, providing design services across the full spectrum of Brand Identity, Graphic Design, Print and Advertising Design & Website Design.

35 comments

on this article: “Customize your WordPress Dashboard”
  1. I would like to thank you for the efforts you have made in writing this article. I am hoping the same best work from you in the future as well. In fact your creative writing abilities has inspired me to start my own BlogEngine blog now. Really the blogging is spreading its wings rapidly. Your write up is a fine example of it.

    • Hi Damion,

      thanks for your comment and your nice words! Always like it when I can inspire someone, but … BlogEngine? Why not WordPress, it’s with a reason it why WP is the world best and most used open source CMS Blog Platform. Nevertheless, good luck and I’ll hope you send me an URL when you’re ready ..?

      Enjoy your day, Cheers & Ciao ..

  2. I don’t normally comment on blogs.. But nice post! I just bookmarked your site

  3. Awesome blogggg!! Love your theme too. I hope you’ll continue to update as I will definitely be back to read up on more of your pages ^^

  4. I like the post you made.<3 Wow, I learned alot from reading your post.d^.^ I will check back here alot!

    • Hi Malcom,

      Thanks for your comment, glad you’ve learned something here ;-P
      See you next time, Cheers & Ciao ..

  5. Quite a lot of time spent to find this information in the network. Not yet stumbled on this topic.

    • Hi tretriank,

      .. Haha, it seems to be your lucky day! It’s all here on the gonzoblog.nl!
      Thanks for your comment, Cheers & Ciao ..

  6. I won’t be able to thank you more than enough for the content on your web site. I know you put a lot of time and effort into them and hope you know how deeply I appreciate it.

    • Hi ZFM,

      Cheers, .. thank you soooo much! Cause, yep, it takes a lot of time and effort to run a blog ;-P
      Thanks for your comment, very much appreciated! Cheers & Ciao ..

  7. This was a really helpful post! Thanks for the code snippets!

    • Hi Brett,

      You’re welcome man, enjoy the snippets and create some extra functionality in your own WP-Dashboard. Cheers & Ciao ..

  8. Hi Jerrold,

    thanks for your comment, really appreciate it! I’ll not update this post, but instead I will post more of these articles.

    You’re a lucky guy, cause tomorrow I’ll be posting another article here on the gonzoblog, .. filled with code snippets/hacks for WordPress.

    So Jerrold, please stay tuned for more, .. it’s coming (your wish is my command ;-P)!

    Thanks for your time to comment, Cheers & Ciao ..

  9. I thought that the post you made was awesome. I hope you keep on updating this page!!!

  10. Hi JPop,

    It’s my pleasure, mate! Cheers & Ciao ..

  11. Yes I heard about that, that’s why I always update when I see a new update ;) Thanks for all your advices Jan :)
    .-= JPop´s last blog ..Hitomi Shimatani – Shirou muno no You ni =-.

  12. Hi JPop,

    You can style even more your dashboard – maybe a thought for another post? -, but these are the most common hacks.

    I donno if these hacks all are WP3.1 compatible, so please, back-up your theme before adding code!

    Cheers & Ciao ..

  13. Great post! I didn’t know we could customize our WP dashboard like this. It’s so cool, I will try this to my Wp blog, thanks a lot for sharing Jan :D
    .-= JPop´s last blog ..Hitomi Shimatani – Shirou muno no You ni =-.

  14. Hi Madeleine,

    Glad I could help you out with comprehending the subject.

    Cheers & Ciao ..

  15. Hi herbata,

    You’re welcome, I hope it will come in handy for you?

    Hi backlinks,

    Thanks for your comment, much appreciated!

    For both of you a warm Cheers & Ciao ..

  16. Hi Ayda,

    This WP-theme is coded and designed by myself, so it’s not downloadable (yet?).

    Hi PC Hardware,

    Think you got a point made there ;-P – Best thing is that these hacks make your WP Dashboard more simple and flexible concerning your own wishes. Let me know if you liked some of these hacks, okay?

    Cheers & Ciao ..

  17. I adore your site theme can you tell me the name of it or where you downloaded it? cya.

  18. Hi Joon,

    it’s really just better to stick to one blogging-platform (e.g. WP, Joombla, Blogger, etc), then trying to mix them.

    You can be sure you’ll have one conflict after another when mixing blogging-platforms.

    Thanks for your comment, Cheers & Ciao ..