How to change the admin bar color in WordPress

Some times you need to work in a DEV enviroment which is an exactly copy of real one, and it’s important to prevent that you are not playing in a productive enviroment, get some helps. One easy and helpfull way to do that is painting the admin bar of the web in a diferent color, to do this the only thing you have to do is add this sentences in your functions.php

add_action('wp_head', 'change_bar_color'); 
add_action('admin_head', 'change_bar_color'); 
function change_bar_color() {
 ?> 
<style> 
#wpadminbar{ 
background: red !important; 
} 
</style> 
<?php 
}

And thi is what you’ll get

 

Deixa un comentari

Your email address will not be published. Required fields are marked *