How to add custom CSS to WordPress admin

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>
   .css-class{
        position: relative;
    }
  </style>';
}

Leave a Reply

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

 

Shopping Cart

  • Your cart is empty.

Get notified of new themes

Promotions

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