[WORDPRESS]How to apply CSS to the Admin Panel

Source code

functions.php

function admin_style() {
echo '
[CSS]
'.PHP_EOL;

}
add_action('admin_print_styles', 'admin_style');

Example

functions.php

function admin_style() {
echo '
<style>

div.categorydiv li.hide-if-no-js{
display:none;
}
div.wp-hidden-children a.hide-if-no-js{
display:none;
}
</style>
'.PHP_EOL;

}
add_action('admin_print_styles', 'admin_style');

 

 

Related article