• Does anyone know where I can remove wordpress’ call to the adminbar.css, admin-bar.min.css files.

    I’ve already established a large css file that contributes to this, no need for multiple http responses.

    [No bumping. If it’s that urgent, consider hiring someone.]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator bcworkz

    (@bcworkz)

    Not only is bumping frowned upon here, you do yourself a disservice because many people will skip over your post when they see 2 posts, assuming your question was answered. You’re lucky I’m a curious sort.

    You can try unsetting the entry in the global $wp_styles. I don’t know what hook to use though. It needs to be late enough that the entry has been added, but before the head section is output.

    I’ve tried this:

    remove_action(‘admin_print_styles’, ‘print_admin_styles’, 20);

    and it wouldn’t work.
    Does anyone have a method to remove the admin-bar.css and admin-bar.min.css?

    What about something like:

    add_action( 'wp_enqueue_scripts', 'xyz_remove_admin_bar_css', 21 );
    add_action( 'admin_enqueue_scripts', 'xyz_remove_admin_bar_css', 21 );
    function xyz_remove_admin_bar_css() {
        wp_dequeue_style( 'admin-bar' );
        wp_dequeue_style( 'admin-bar-min' );
    }

    Codex: wp_dequeue_style()

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘WP Admin Bar CSS origin’ is closed to new replies.