How to use custom CSS in the WordPress admin interface

A bit related to my previous post about using jQuery UI elements in the WordPress admin interface, it’s likely that at some point you want to load your own CSS styles to your plugin or theme’s admin pages.

Lucky for us that’s a lot easier that loading JavaScript! Here’s how – works without adding an action, anywhere outside your main function:

Be aware that your CSS will be loaded on every admin page. Since you’ll probably only make minor changes to your own ID’s and classes it’s not a major problem. But if you wanted to you could enqueue styles just like custom JavaScript, as I’ve explained before.

There’s a usage example in the WordPress Codex:

About Jay Versluis

Jay is a medical miracle known as a Super Survivor. He runs two YouTube channels, five websites and several podcast feeds. To see what else he's up to, and to support him on his mission to make the world a better place, check out his Patreon Campaign.

Add your voice!