How to add custom CSS to WordPress admin

May 13, 2016

In some cases when you’re working with a WordPress website you might need to add some custom css to the admin area. Like when you want to modify the look of a theme options page or some other element.

Below there’s a snippet that you can use to add css code to the WordPress admin. Just copy/paste it in the ‘functions.php’ file.

add_action('admin_head', 'my_theme_admin_style');
function my_theme_admin_style() {
  echo '<style>
        position: relative;

Leave a Reply

Your email address will not be published.



Get notified of new theme releases.

lifetime package

Get all our current and future themes with a one time payment.

View Details

Seasonal sale! Use code 'discount20' to get 20% discount on all products including our Lifetime Package.
Summer is here!! Use code 'summer30' to get 30% off all our themes including the Lifetime Package.