How to Hide WordPress Toolbar

How to Hide WordPress Toolbar

When logging into the WordPress dashboard, you will see a toolbar (admin bar) at the top that provides quick links and the ability to manage sections. However, this toolbar can seem redundant or even annoying when you want to view the user-friendliness of your website or page layout. In this article, we'll cover a few simple ways you can easily hide or disable the WordPress toolbar.

When to hide the toolbar

  1. Loss of administrator access: IfForgot Password, Security PluginLocking you out or plugin/theme issues that prevent access to the WordPress admin dashboard can be regained by hiding the toolbar.
  2. Broken WordPress: Encountering common WordPress incorrectWhen you do, you can help regain control by hiding the toolbar.
  3. security issue: If your website is hacked, you can protect it by hiding the toolbar.

Ways to hide the toolbar

1. Hiding toolbars through user settings

This is the easiest method for novice administrators:

  • Log in to your WordPress dashboard.
  • Open the "Users" section and select "personal profile".
  • Under the "Toolbars" option, uncheck "Show toolbars when viewing websites".
How to Hide WordPress Toolbar

This way, the toolbar will no longer be displayed when you are logged in as that user.

2. Hiding the toolbar with plug-ins

WordPress has a number of plugins that can help you customize various aspects of your website, some of whichplug-in (software component)You can hide the toolbar:

  • Adminimize: This plugin allows you to customize which parts of the toolbar should be displayed based on user roles.
  • Hide Admin Bar Based on User Roles: You can choose to hide toolbars for specific user roles, such as author, editor, etc.
3. Using code snippets to hide toolbars

If you know your way around the code, you can find it in the theme's functions.php Add the following code snippet to the file:

How to Hide WordPress Toolbar
  • Disable the toolbar completely:
add_filter('show_admin_bar', '__return_false');
  • Disable toolbars only for specific user roles (e.g. author):
add_filter('show_admin_bar', function($show) { if (current_user_can('author')) { return false; } return $show; });

caveat

  1. Avoid removing necessary features: Hiding the toolbar affects some quick actions, so make sure they don't interfere with your day-to-day management.
  2. test code: Before adding the code to the functions.php Before you file, it is a good idea to test it in your development environment to make sure there are no errors.
How to Hide WordPress Toolbar

summarize

The WordPress toolbar provides a lot of convenient shortcuts for website management, but in some cases, hiding it will allow you to better experience and manage your website. With user settings, plugins, or code snippets, you have the flexibility to customize theharbor (i.e. keep sth hidden)maybeprohibit the use of sth.Toolbar to improve the user experience and management efficiency of the website.


Contact Us
Can't read the article? Contact us for a free answer! Free help for personal, small business sites!
Tel: 020-2206-9892
QQ咨询:1025174874
(iii) E-mail: info@361sale.com
Working hours: Monday to Friday, 9:30-18:30, holidays off
Posted by photon fluctuations, retweeted with attribution:https://www.361sale.com/en/12983/

Like (0)
Previous July 9, 2024 10:23 am
Next July 9, 2024 at 10:57 am

Recommended

Leave a Reply

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

Contact Us

020-2206-9892

QQ咨询:1025174874

E-mail: info@361sale.com

Working hours: Monday to Friday, 9:30-18:30, holidays off

Customer Service
In order to facilitate global user registration and login, we have canceled the telephone login function. If you encounter login problems, please contact our customer service for assistance in binding your email address.