Page 1 of 1
Forum

Welcome to the Tweaking4All community forums!
When participating, please keep the Forum Rules in mind!

Topics for particular software or systems: Start your topic link with the name of the application or system.
For example “MacOS X – Your question“, or “MS Word – Your Tip or Trick“.

Please note that switching to another language when reading a post will not bring you to the same post, in Dutch, as there is no translation for that post!



WordPress - How to ...
 
Share:
Notifications
Clear all

[Solved] WordPress - How to add your own CSS to the admin pages ...

1 Posts
1 Users
0 Reactions
1,499 Views
 Hans
(@hans)
Famed Member Admin
Joined: 12 years ago
Posts: 2859
Topic starter  

Since I've been using a custom font for icons on my admin pages, I had to add my own CSS file to the head of the admin pages.

This is how it's done ...

Add the following code to your functions.php file and make sure to change the location of your css file:

// Add CSS to Admin pages
function t4a_admin_css() {
echo '<link rel="stylesheet" type="text/css" href="'.get_template_directory_uri().'/css/yourcssfile.css">';
}
add_action( 'admin_head', 't4a_admin_css' );


   
ReplyQuote
Share: