I want to load a css file into Wordpress Dashboard using child theme?
1 Answer
You need to use admin_enqueue_scripts
hook to load CSS in admin area.
This goes in your themes functions.php
. Assumed that your file is at child_theme_path/css/admin-css.css
function wpse239532_load_admin_style() {
wp_enqueue_style( 'admin_css', get_stylesheet_directory_uri() . '/css/admin-css.css', false, '1.0.0' );
}
add_action( 'admin_enqueue_scripts', 'wpse239532_load_admin_style' );