WordPress

Hide Admin Bar in WordPress to Users Except Admin

0
WordPress

There are three ways to hide the admin bar in WordPress:

1. Using the WordPress dashboard

  1. Go to Users > All Users.
  2. Click on the user’s name whose admin bar you want to hide.
  3. Under the Toolbar section, uncheck the Show Toolbar when viewing site box.
  4. Click Update Profile.

This will hide the admin bar for the specified user.

2. Using a WordPress plugin

There are many WordPress plugins that can be used to hide the admin bar. One popular plugin is called Hide Admin Bar.

To use this plugin:

  1. Install and activate the plugin.
  2. Go to Settings > Hide Admin Bar.
  3. Select the user roles for which you want to hide the admin bar.
  4. Click Save Changes.

This will hide the admin bar for the selected user roles.

3. Using custom CSS

You can also use custom CSS to hide the admin bar. To do this, add the following code to your theme’s style.css file:

CSS
body.admin-bar {
  display: none;
}

This will hide the admin bar for all users.

Which method should you use?

The best method to use depends on your needs. If you only need to hide the admin bar for a specific user, then you can use the WordPress dashboard method. If you need to hide the admin bar for multiple users, then you can use a WordPress plugin. If you need to hide the admin bar for all users, and you are comfortable with CSS, then you can use the custom CSS method.

I hope this helps!

Get Featured Image URL from Posts in WordPress

Previous article

Disable Plugin Updates in WordPress – Working

Next article

You may also like

Comments

Leave a reply

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

More in WordPress