Customize WordPress Admin Styles from Your Theme Directory

by Yang Yang on December 30, 2012

It’s better to style the /wp-admin of WordPress from your theme because it’s portable and upgrade-proof. Keeping all customizations  in ONE place is always a good idea in web development.

How to style WordPress admin backend /wp-admin from your theme?

  1. Add this hook to the functions.php of your theme:
    function customAdmin() {
        ?><link rel="stylesheet" type="text/css" href="<?php bloginfo('stylesheet_directory'); ?>/wp-admin.css" /><?php
    }
    add_action('admin_head', 'customAdmin');

    Which effectively adds a stylesheet to the header of every /wp-admin page.

  2. Create a text file named wp-admin.css in your theme directory.
  3. Write the customization styles in wp-admin.css.

That’s it. Now you can freely customize the look and appearance of the WordPress admin backend from within wp-admin.css in your theme directory.

Comments on this entry are closed.

Previous post:

Next post: