Custom Admin CSS in WordPress

Here is a snippet for you to add to your WordPress site to customise the CSS of the WordPress Admin Area. This is useful if you want to hide elements, change their colours etc – basically you can add any styles you want.

Add this to your site’s functions.php file:-


function customAdmin() {
    $url = get_settings('siteurl');
    $url = $url . '/wp-content/themes/your-theme-name/styles/admin.css';
    echo '<!-- custom admin css -->

          <!-- /end custom adming css -->';
add_action('admin_head', 'customAdmin');

Replace ‘your-theme-name’ with your actual theme name and now simply create a ‘styles’ directory in your theme if you haven’t already got one and then add a css file called admin.css. All you now have to do is add your CSS styles in the admin.css file as norma – So Easy!

What if I’m using WordPress Multisite?

We’ve got you covered. Just change ‘site url’ on line 06 to ‘network_home_url‘.

About the Author
Custom Admin CSS in Wordpress Custom Admin CSS in Wordpress 0da77002febbfe28d15144a57bbcc2c9 s 180 d mm r g


A highly experienced Web Designer / Web Developer (Webflow, WordPress, Weebly & Custom), Front-end / Back-end Developer & New Media Specialist, with extensive knowledge of a wide spectrum of technologies in the Development and Creative Industries, built up over a number of years.