Make WordPress Admin Bar Invisible


Add the following code inside functions.php

add_filter( 'show_admin_bar', '__return_false' );

The above code will hide admin bar for all users including administrators. If you like show admin bar to admins only, then add the following code:-

add_action('after_setup_theme', 'remove_admin_bar');
function remove_admin_bar() {
if (!current_user_can('administrator') && !is_admin()) {

Leave a Reply

Your email address will not be published. Required fields are marked *