Back WordPress

Add custom CSS to WordPress Admin

WRITTEN BY ON 19 Mar 2014
5,697 VIEWS • SHARES
0 comments

This snippet allows custom CSS file to be loaded into WordPress admin header. I set to the CSS path pointing to theme folder. This script should put inside functions.php in your theme.

add_action('admin_head', 'custom_css');

function custom_css() {
	echo '<link rel="stylesheet" href="' . get_template_directory_uri() .  '/library/css/admin.css" />';
}
Join the discussion

Comments will be moderated and rel="nofollow" will be added to all links. You can wrap your coding with [code][/code] to make use of built-in syntax highlighter.