How to change admin bar color scheme in MP6 / WP 3.8 front end?

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:

add_action(
    'wp_enqueue_scripts',
    function () {
        wp_enqueue_style(
            'color-admin-bar',
            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.

Leave a Comment