I don't want to fully disable the admin bar. I just want to remove its css file so I can fully customize it myself without having to override anything with greater selectors or a load of !important

The exact file name that is being loaded is admin-bar.min.css and then along with the Wordpress version ?ver=[...]

1 Answer 1


This Should do the trick

function adminBar_dequeue() {

add_action( 'wp_enqueue_scripts', 'adminBar_dequeue', 9999 );
add_action( 'wp_head', 'adminBar_dequeue', 9999 ); 


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.