WordPress comes with an admin bar that displays convenient shortcuts for logged in users.
This gives you quick access to administrative tasks even when viewing the front end of your website.
In this article, we will explain what the WordPress admin bar is and how to use or customize it according to your needs.
What is the WordPress admin bar?
The WordPress admin bar is a floating bar that is displayed for logged in users. It contains links to different management screens, allowing logged-in users to quickly switch to the administrative area when viewing the website.
The management bar is displayed to all users in the management area. Individual users can hide the admin bar when viewing websites by editing their user profile.
The items displayed in the WordPress admin bar vary according to user roles and permissions. For example, users with administrator roles see items in the menu bar differently than users with editor roles, etc.
Show or hide items in WordPress admin bar
Just like everything else in WordPress, the admin bar can be completely customized with custom code or WordPress plugin. Some plugins have taken advantage of this by adding their own menu items in the admin bar.
To control the admin bar, first you need to install and activate the Adminimize plugin. For more details, see our step-by-step guide on how to install WordPress plug-ins.
Once activated, go to the Settings » Admin page and look for the Admin Bar Backend Options and Admin Bar Front End Options tabs.
Clicking each option will go to the admin bar option, where you can select the items you want to display in the WordPress admin bar. You can also select which items you can see for each user role.
Don't forget to click the "Update Options" button to save the changes.
Adminimize is a powerful plugin that allows you to not only change the admin bar, but also allows you to change any admin screen on your WordPress website.
If you are looking for an alternative, see our guide on how to hide unnecessary items from WordPress management using the Admin Menu Editor plugin.
Add custom links to the WordPress admin bar
The purpose of the WordPress admin bar is to provide quick and shortcuts to different management screens. You can further customize it by adding your own custom link to the admin bar.
To do this, you need to add custom code to your WordPress file. If you haven't done this before, check out our guide on how to copy and paste code in WordPress.
You need to add this code to the theme's functions.php file, site-specific plugin, or code snippet plugin.
We recommend using the WPCode plugin to add this code in WordPress. This is the safest and easiest way to add custom code in WordPress without editing the theme's functions.php file.
First, you need to install and activate the free WPCode plugin. If you need help, see a tutorial on how to install WordPress plug-in.
After activate WPCode, go to Code Snippets» from the WordPress dashboard. Then, navigate to the "Add Custom Code (New Snippet)" option and click the "Use Snippet" button below it.
Next, you need to add a title to the code snippet, which can be anything that can help you remember the purpose of the code.
After that, paste the above code snippet into the Code Preview box.
Don't forget to select "PHP Snippet" as the code type from the drop-down menu on the right side of the screen.
Once done, just switch the switch from Inactive to Active and click the Save Fragment button.
For more details, see our guide on how to easily add custom links to the WordPress admin bar.
Disable the admin bar for all users except administrators
The admin bar is very useful for webmasters, editors, and authors. However, it is not very useful if you are running a WordPress membership site or simply ask the user to log in to perform certain tasks.
In this case, you may want to disable the admin bar for all users except the site administrator. You need to add the following code to the theme's functions.php file, site-specific plugin, or code snippet plugin (such as WPCode).
add_action('after_setup_theme', 'wpb_remove_admin_bar'); functionwpb_remove_admin_bar() {if(!current_user_can('administrator') && !is_admin()) { show_admin_bar(false);}}
Depend on
Use it with one click in WordPress
For more details, see the article on how to disable the WordPress admin bar for all users except administrators.
We hope this article helps you learn more about the WordPress admin bar. You may also want to check out our ultimate step-by-step WordPress security guide to make your WordPress management area safe and secure, or we recommend the best WordPress SEO plugin you should use.
The above is the detailed content of What should everyone know about the WordPress admin bar. For more information, please follow other related articles on the PHP Chinese website!

Enable comments on your WordPress website to provide visitors with a platform to participate in discussions and share feedback. To do this, follow these steps: Enable Comments: In the dashboard, navigate to Settings > Discussions, and select the Allow Comments check box. Create a comment form: In the editor, click Add Block and search for the Comments block to add it to the content. Custom Comment Form: Customize comment blocks by setting titles, labels, placeholders, and button text. Save changes: Click Update to save the comment box and add it to the page or article.

How to copy WordPress subsites? Steps: Create a sub-site in the main site. Cloning the sub-site in the main site. Import the clone into the target location. Update the domain name (optional). Separate plugins and themes.

The steps to create a custom header in WordPress are as follows: Edit the theme file "header.php". Add your website name and description. Create a navigation menu. Add a search bar. Save changes and view your custom header.

Enable comments in WordPress website: 1. Log in to the admin panel, go to "Settings" - "Discussions", and check "Allow comments"; 2. Select a location to display comments; 3. Customize comments; 4. Manage comments, approve, reject or delete; 5. Use <?php comments_template(); ?> tags to display comments; 6. Enable nested comments; 7. Adjust comment shape; 8. Use plugins and verification codes to prevent spam comments; 9. Encourage users to use Gravatar avatar; 10. Create comments to refer to

You can install the FTP plug-in through WordPress, configure the FTP connection, and then upload the source code using the file manager. The steps include: installing the FTP plug-in, configuring the connection, browsing the upload location, uploading files, and checking that the upload is successful.

How to copy WordPress code? Copy from the admin interface: Log in to the WordPress website, navigate to the destination, select the code and press Ctrl C (Windows)/Command C (Mac) to copy the code. Copy from a file: Connect to the server using SSH or FTP, navigate to the theme or plug-in file, select the code and press Ctrl C (Windows)/Command C (Mac) to copy the code.

WordPress Error Resolution Guide: 500 Internal Server Error: Disable the plug-in or check the server error log. 404 Page not found: Check permalink and make sure the page link is correct. White Screen of Death: Increase the server PHP memory limit. Database connection error: Check the database server status and WordPress configuration. Other tips: enable debug mode, check error logs, and seek support. Prevent errors: regularly update WordPress, install only necessary plugins, regularly back up your website, and optimize website performance.

How to turn off a comment in WordPress? Specific article or page: Uncheck Allow comments under Discussion in the editor. Whole website: Uncheck "Allow comments" in "Settings" -> "Discussion". Using plug-ins: Install plug-ins such as Disable Comments to disable comments. Edit the topic file: Remove the comment form by editing the comments.php file. Custom code: Use the add_filter() function to disable comments.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Zend Studio 13.0.1
Powerful PHP integrated development environment

SublimeText3 Chinese version
Chinese version, very easy to use

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

SublimeText3 Mac version
God-level code editing software (SublimeText3)