There are times when you need to do a little customization of the admin area – the styles and whatnot. It’s very simple to set this up.
- Create a new stylesheet in your theme/child theme. I generally like to keep these separate stylesheets in a directory simply title css. Call it something like admin-css.css.
- Open your functions.php file and add the following code snippet:
// Add a stylesheet for custom post admin panels // add_action('admin_init', 'custom_post_admin_css'); function custom_post_admin_css() { wp_register_style( 'post-admin-css', TEMPLATEPATH . '/admin-css.css' ); wp_enqueue_style( 'post-admin-css' ); }
Obviously where it says TEMPLATEPATH you’ll want to replace that with the correct path. And where is says “admin-css.css”, simply make sure it matches the name of the file you created in the previous step.
- Add some styles to see how it works. One easy one you can do just to make sure it’s working is:
body { font-family: serif; }
Now go to your admin panel and see if it’s changed to a serif font. If it hasn’t, check your templatepath again.