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>
        position: relative;

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


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

Buy one get one free!! Add any two themes to your shopping cart and use code "onefree" during checkout.
Summer is here!! Use code 'summer30' to get 30% off all our themes including the Lifetime Package.