Search
Close this search box.

WordPress Admin CSS Styles

[updated_on]
Share this post:

Add one of the functions below to your child theme’s functions.php file.

If you just need to add or adjust a few styles use this code to add CSS directly to admin pages.

function my_admin_styles() {
  echo '<style>
    h1 {
      font-family: "Georgia";
      font-size: 20px;
      color:red;
    } 
  </style>';
}

add_action('admin_head', 'my_admin_styles');

If you want to create an admin theme or need to adjust or add lots of styles use the code below.

// function to add a custom admin stylesheet
function my_admin_style_sheet() {
  echo '';
}

add_action('admin_head', 'my_admin_style_sheet');

get_stylesheet_directory_uri() code reference in the WordPress Codex.

Share this post:

Leave a Comment

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

WPLearningLab