How to Easily Add Custom CSS to Your WordPress Admin Dashboard
As we know WordPress comes with a great dashboard along with the Admin menu(wp-admin) and Admin bar. But the fact is most of the user dislikes and want to add some more additional features along with CSS effects, now the question arises is how can we make these changes?
Yes, The first and main Important thing is how well you know development on WordPress. This is important because you need to know the flow and layout of WordPress development. In this article we are going to show how to add Custom CSS to WordPress Admin Panel or Dashboard.
Step 1: Go to active theme directory and click edit on functions.php file
Paste the following codes
function admin_style() { wp_enqueue_style('admin-styles', get_template_directory_uri().'/admin-bar.css'); } add_action('admin_enqueue_scripts', 'admin_style');
In the above code :
- admin_style() is function, which register’s your CSS file for admin panel.
- wp_enqueue_style Registers the style if source file is provided.
- get_template_directory_uri() This is to get active theme directory of your site.
- admin-bar.css This your custom CSS file name.
Here is the full and final step of this article just upload your CSS file to active theme directory and apply your custom CSS to WordPress Admin Panel.
Add Comment