Doc WordPress WordPress Tricks, Tips & Snippets

1Aug/180

Load a custom CSS file in WordPress admin

With this little snippet you can load your own css file into the WordPress admin which will allow you to easily hide unneeded items to keep the admin clean and tidy and avoid unnecessary confusion for our clients:

// The function include a css files for backend
function backend_css_style() {
	echo '<link rel="stylesheet" href="' . get_stylesheet_directory_uri() . '/admin.css" type="text/css" media="all" />';
}
add_action('admin_head', 'backend_css_style');

Just this into your functions.php and also put a "admin.css" file into your child theme folder 🙂

Comments (0) Trackbacks (0)

No comments yet.


Leave a comment

No trackbacks yet.