How to Add CSS Styles to WordPress Admin

WordPress has obviously grown from a personal blogging tool to a collaborative blogging environment with multiple authors and multiple blogs in a network with the WordPress multisite.

This sometimes call for styling not only your front end for your visitors, but also the backend of your WordPress admin. Well, if you are looking for fully fledged admin themes, Go google for WordPress admin themes and you will end up with many plugins that do that. And if you are looking at completely revamping your backend, complete with your own branding and custom stuff, the Easy Blogging Plugin is made for you.

WordPress Admin CSS

If that’s not what you are looking for, but instead some tweaks here and there, like hiding some stuff using display:none or something of that sort, here is what you need to do.

Add the following snippet into the functions.php of your active theme:

// add admin css
add_action( 'admin_print_styles', 'load_custom_admin_css' );
function load_custom_admin_css()
{
wp_enqueue_style('my_style', WP_CONTENT_URL . '/themes/custom_admin.css');
}
//end admin css

Now create a custom_admin.css in your wp-content/themes/ folder and add all the custom css you want in there.

For instance, to hide the Plugins section from the Admin sidebar, you would add to your custom_admin.css:

#menu-plugins {
display:none !important;
}

Of course, this is a cosmetic change, like all things css. The plugins area would still be accessible via a direct link. If you wish to remove them or show them based on user-role, Admin Menu Editor can do that for you.

Have fun. Out.

Update: If you want this to be theme independent, I have a cute plugin for you: Admin CSS MU. Check it out.

Email this to someoneTweet about this on TwitterShare on FacebookDigg thisPin on PinterestShare on Google+

Hey! Thanks for reading my article, I hope you enjoyed it. If you think your friends might find it useful, do them a favor and share it with them. They will thank you for it. My journal: Kuttappi.com

Posted in WordPress Tagged with: , , , , ,

1 Comment.

  1. Juan says:

    Thanks, good tip!

1 Pings / Trackbacks.

  1. […] WP-Admin By Arun Basil Lal | Published: July 3, 2012 I had written on how to load CSS on the admin side before. This involved adding the load function into the functions.php of the […]

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Get Free Updates

Divi WordPress Theme

Divi WordPress Theme

My Review: Divi is the only WordPress theme you will ever need. It comes with a drag-and-drop theme builder. You can build beautiful looking unique websites without touching a line of code. Just choose from one of the many pre-made layouts, or pick elements and arrange them any way you like.

Divi is every WordPress developer's wet dream. You can surprise your clients with neat responsive websites and have fun building them.

Divi comes from Elegant Themes. If you enjoy building websites, you *need* an Elegant Themes membership. 87 beautiful themes and 5 plugins for the cost of less than a candy-bar each!




Note: I am an avid user of Divi myself. When you use my affiliate link I will earn a commission, at no extra cost to you of course, and all the earnings are put towards running and improving this website. This is an honest review and my views are impartial.