• I have to change the admin bar:
    from #5F5F5F on normal state and have change to #000000 on hover over 300 milliseconds.

    I added this to functions.php:
    add_action(‘wp_head’, ‘change_bar_color’);
    add_action(‘admin_head’, ‘change_bar_color’);
    function change_bar_color() {
    ?>
    <style>
    #wpadminbar{
    background: #5F5F5F !important;
    }
    </style>
    <?php
    }

    What else I should add ?
    I don’t know how to go forward

Viewing 1 replies (of 1 total)
  • Hello,

    Your code actually worked fine for me (to change the background color of the admin bar). Is the issue to change the color to black on hover? If so, you can add a :hover state to your CSS:

    add_action('wp_head', 'change_bar_color');
    add_action('admin_head', 'change_bar_color');
    function change_bar_color() { ?>
    	<style>
    		#wpadminbar {
    			background: #5F5F5F;
    		}
    		#wpadminbar:hover {
    			transition-delay: 0.3s;
      			background-color: #000000;
      		}
    	</style>
    <?php }

    If your style isn’t working at all, I would make sure that the function file you are altering is in your active theme though I am sure you did that. Good luck!

Viewing 1 replies (of 1 total)
  • The topic ‘Change the color of admin bar’ is closed to new replies.