In this article you will learn how to correctly add custom CSS to your WordPress dashboard. This is great if you want to create a white-label solution in some cases. Adding CSS to the WordPress area will require some code to achieve. Adding CSS code to the WordPress Customizer will only affect the front-end of your site.
The Code
This will require you to know a little bit of CSS and how to add code snippets to your WordPress site. You can get ‘fancy’ with this and load custom CSS in the WordPress dashboard based on query parameters, or specific pages in the admin area.
The code above simple hides the “Collapse menu” link from the admin bar of the WordPress dashboard as an example. You can adjust this to hide/adjust styling of items in the WordPress dashboard. You could even extend this code to adjust the styling per user/role.
Please feel free to leave a comment below if you have any questions regarding this code or reach out to us via our contact form.