I need to change default color scheme for all users. The admin bar on my site is vidibile for all users including guests. The default black color scheme isn't beauty with my design and I would like to change it with cofee scheme. Is there any way to do this?

I already found

function change_admin_color($result) {
   return 'coffee';

But it disable feature to choose another color scheme for users. And first of all it work only for logged in users.

3 Answers 3


At the moment (3.8) color schemes do not apply to admin bar at front end at all, even if user is logged in and has non-default scheme selected.

The shortest way would probably be to force enqueue color scheme at front end:

    function () {
            admin_url( '/css/colors/coffee/colors.min.css' ),
            array( 'admin-bar' )
    } );

Note that core chose not to do it, so it is untested and there is risk of style incompatibilities and such.

  • May be not the best way, but it works perfectly. Like I need. Thank you!
    – okonik
    Commented Dec 14, 2013 at 21:56

You can setup a theme on profile update, and if it present return that from the function hooking get_user_option_admin_color otherwise return the default:

add_action('profile_update', function($user_id) {
  // on profile update save the unfiltered color choice in an additional meta
  $set = get_user_meta('admin_color', $user_id, true) ? : 'coffee';
  update_user_meta($user_id, '_setted_admin_color', $set);


function change_admin_color($result) {
   $color = 'coffee';
   if ( is_user_logged_in() ) { // for nono logged user output default
      // get the unfiltered color meta
      $setted = get_user_meta( get_current_user_id(), '_setted_admin_color', true );
      // if present set color to that
      if ( ! empty($setted) ) $color = $setted;
   return $color;

Code require PHP 5.3. Untested.

  • Thank you a lot, but it works only for logged in users.
    – okonik
    Commented Dec 14, 2013 at 21:50

https://wordpress.org/plugins/admin-bar-color/ works, is light-weight, well written and on GitHub.

I had to re-save my profile once, but now my frontend admin bar color matches /wp-admin/.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.