Black Friday: 20% off PRO Ends in Grab the deal

The admin bar is useful for whoever runs the website. Everyone else, like authors, subscribers or customers, usually doesn’t need it on the frontend. This guide shows how to show the WordPress admin bar only to administrators, with a free plugin or with code.

Don’t have the plugin yet? Download Better Admin Bar for free from WordPress.org.


With a free plugin

  1. Install and activate Better Admin Bar (Plugins → Add New Plugin, search for “Better Admin Bar”).
  2. Go to Settings → Better Admin Bar and open the Admin Bar tab.
  3. Under Remove Admin Bar, tick every role except Administrator.
  4. Click Save Changes.

Roles from other plugins, for example WooCommerce’s Customer and Shop Manager, are in the same list. If you install a plugin later that adds a new role, come back and tick that one too.

Tip: editors who update content every day may miss the admin bar. Leave Editor unticked, or give them the quick access panel instead.


With code

Add it to your child theme’s functions.php or to a code snippets plugin.

add_action( 'after_setup_theme', function () {
	if ( ! current_user_can( 'manage_options' ) ) {
		show_admin_bar( false );
	}
} );

manage_options is a permission only administrators have by default, so this also covers roles that are added later.


Check that it works

As an administrator you keep seeing the admin bar, so test with another user: create one under Users → Add New User with a role like Subscriber, log in as them in a private browser window and open your website.

The admin bar inside the WordPress dashboard always stays. Both methods hide it on the frontend only.


Still need help?

Browse the other articles or create a support ticket and we'll get back to you.