This PHP code enables you to add CSS rules to a new style sheet named admin.css which should be placed in the root directory of your child themes folder.
Please copy ALL the code and paste it at the end of your child themes functions.php file using a text editor like Notepad++
add_action( 'admin_enqueue_scripts', 'enqueue_admin_style_sheet' );
function enqueue_admin_style_sheet() {
wp_register_style( 'admin-css', get_stylesheet_directory_uri() . '/admin.css', false, '1.0.0' );
wp_enqueue_style( 'admin-css' );
}
Adding CSS code to your main child themes style sheet will not work in your wp admin area.
Was This Tutorial Helpful?