Admin bar default color scheme for nonregistered/nonlogged users
Follow these steps: Use the following code in your functions.php or your site specific plugin: function set_default_admin_color($user_id) { $args = array( ‘ID’ => $user_id, ‘admin_color’ => ‘coffee’ ); wp_update_user( $args ); } add_action(‘user_register’, ‘set_default_admin_color’); Now, add these lines to force “Coffee” color scheme to be displayed in the admin bar: if ( !current_user_can(‘manage_options’) ) remove_action( … Read more