WordPress Tip: Disable the Toolbar on a Per-User-Role Basis

The WordPress toolbar is shown by default to all users, but administration screen links aren’t always useful for everyone. For example, on most sites the subscriber user role is very limited and doesn’t require access to the backend.

Disable Toolbar is a new plugin that gives administrators the ability to turn the toolbar off on the frontend, based on user roles. It adds a list of all user roles on the site to Settings > Toolbar and even includes roles added by other plugins. Check the roles for which you want to remove the toolbar.

user-roles

There are many plugins in the repository dedicated to hiding the toolbar. This one is different in that it hides it only on the frontend. The admin area will always display the toolbar, even if you’ve elected to hide it for certain user roles on the frontend. It also hides the toolbar option on user profiles if that user is already restricted from seeing the toolbar.

I tested the plugin and can verify that it works as advertised to show/hide the toolbar based on role. Instead of disabling the toolbar across the board, this one works nicely to hide it selectively, according to your requirements. You can download Disable Toolbar from WordPress.org.

8 Comments


    1. People should not use plug-ins for these type of problems. Disabling the admin bar is something you fix in the functions file. The internet is full of examples how to do this. So to keep your wordpress site fast and clean: Learn about functions (it is not that difficult) and limit the use of plug-ins.

      Report


      1. I disgaree. Once you switch themes, the changes in the functions file are lost unless you add them to the new theme’s functions file. So why bother with that when you can just use a plugin. It’s similar to why you’d add Google Analytics code via a plugin and not directly to a theme.

        Report


      2. Running a very specific plugin like this isn’t going to make your site slow. And having your functions file pile up code in no particular order has its downsides. A plugin you can at least turn on and off without having to dig into code. If you’re going to write some functions yourself, stick it in a separate plugin. It’s saner.

        Report


      1. I released my plugin the day after WP 3.1 was released and introduced the “Admin Bar” (later redubbed “Toolbar”) feature, it definitely was a big request for client projects at the time :)

        Report


  1. It is an interesting concept, and I might look into it when I want to view a site and not log out of it. The bar at the top tends to move content down when I want to look at the native screen. Disabling the bar would keep be from having to open up a new browser or log out.

    Report

Comments are closed.