How to Add Custom CSS to Admin Area

Last modified Oct 24, 2019
Difficulty Intermediate
Language CSS, PHP

You can stylize the dashboard admin area with the custom CSS. Here is the snippet code you need to paste into functions.php file. Replace the comment with your custom code.

“admin_head is an action event and can be hooked by add_action hook. The action refers on the admin area and everything you include here will be applied only on the admin side. ”

More information


Does this snippet (still) work?

Please let us know in the comments if everything worked as expected. We have tested this code with the Version: 4.0.1 of the Divi Theme and Divi Friendly Hosting with PHP 7.3 and WordPress 5.2.4.
If you think this code saved you time, we will be happy to receive a comment! ?


License: This snippet is from, copyright WordPress,  Licensed under the GNU General Public License, no warranty; click here for details.


add_action('admin_head', 'my_custom_acode');

function my_custom_acode() {
  echo '<style>
   /* your code here */


Your Comments

Submit a Comment

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

Receive notifications about our new blog posts.

Before You Start

Build a Child Theme

Child themes are incredibly important for the overall look, feel, and navigation of your website, so we encourage you to take the time to get to know the content. This will help your web design and development processes tremendously. That’s why we’ve made it super easy to build a child theme for Divi or Extra in seconds!

Generate Child Theme

How to Add Java Script and jQuery to Divi

There are four ways you can add JavaScript or jQuery to a Divi website: use the code module, the Divi Theme Options console, enqueue scripts using the functions.php file, or using a plugin.

Read More

How to Add CSS to Divi

Divi users can choose between five different methods to add custom CSS to their websites. Read more about these various methods you can use to add custom CSS to your Divi theme, as well as better understand the pros and cons of each method.

Read More