Ever since WordPress 3.1, WordPress developers add many stunning features to the platform, among which admin bar is a controversial feature. The practice offers a lot of benefits for registered users, which makes life easier by letting them add ads, links, write posts, edit posts, get short links, and many other things.
However, allowing all users to use the admin bar may pose dangers for the site. Thus, it is necessary to create different levels of users and hide the admin bar from some of them. Of course, if you intend to eliminate the potential danger entirely, you can also remove WordPress admin bar for all people.
Generally speaking, there are two popular ways to remove WordPress admin bar: using codes or plugins. Either solution is easy to handle, which only takes a few minutes. However, considering some site owners are beginners in website managing field, our editors carefully explain how to carry out the two methods in the following.
Remove Admin Bar with Codes
As WordPress is based on PHP, many things on the CMS can be configured with codes. Of course, you can write codes to disable the admin bar for users. In the following, we give some code examples, and all you need to do is to copy them to your theme’s function.php file. Note that you’d better learn some PHP knowledge through PHP books for long-term concern.
Remove Admin Bar for All Users
If you add the following codes to the theme function.php file, then the admin bar will disappear when users login to your admin panel.
Disable Admin Bar for All but Administrators
Admin bar is extremely useful for administrators to manage the website; thus, keeping it for those people may be an advisable choice. The following codes can disable the admin bar for all users except administrators.
Remove Admin Bar for Selected Users
In fact, an admin bar can simplify the process for users to enrich website content but it is also dangerous to enable every user to use it. Thus, you can pick out users that you don’t trust; then, hide the admin bar from them. In this way, the rest users can still have the priority and enjoy the convenience brought by admin bar. The codes listed in below can help you disable the admin bar for unwanted users with their ID.
Remove Admin Bar with Plugins
Thanks to talented developers in WordPress, there are numerous WordPress plugins to extend the CMS’s functionality, such as sitemap plugins, cache plugins, and admin bar removing plugins that are alternatives for codes. In the following, our editors choose some popular and rich featured ones to help readers disable admin bar with ease.
Disable WP Admin Bar Removal
As the name shows, the plugin aims to help users disable admin bar in an easy and labor-saving way. It is compatible with many platforms including bbPress, BuddyPress, as well as WordPress. Till now, more than 62, 000 webmasters are using it to manage the admin bar. Once you have chosen the plugin, you can get rid of admin bar, toolbar, bump CB, and many other things.
Disable Admin Bar and ToolBar
No matter the admin bar is on the frontend or backend, Disable Admin Bar and ToolBar can clean it easily. Of course, this is not all capabilities that the plugin comes with. It can also shut down tool bars, shadow effect of admin menu, personal choices of showing or hiding the admin/tool bar, and so on so forth.