Hiding the WordPress dashboard area from users or non-admins is popular among WordPress site owners.
Here’s a couple of reasons why you would want to hide the WordPress dashboard area from users:
- You want to improve the user experience for your customers.
- Have a “cleaner” design for your site.
- You don’t want user’s to be aware of your tech stack (software used) on your site.
There’s no downfall in allowing customers into the backend of your website. As mentioned in the points above it’s mainly for an aesthetic point of view.
To achieve the desired results, you will need to install the following two plugins:
- Remove Dashboard Access by Drew Jaynes (DrewAPicture)
- Hide Admin Bar from Non-Admins by Stranger Studios
Installing Hide Admin Bar from Non-Admins
This plugin doesn’t have any settings that need to be changed. It will hide the admin bar from the frontend of WordPress for all user’s except administrators. This does not restrict access to the WordPress dashboard, that’s where the Remove Dashboard Access plugin comes into play.
- Upload the
hide-admin-bar-from-non-adminsdirectory to the
/wp-content/plugins/directory of your site.
- Activate the plugin through the ‘Plugins’ menu in WordPress.
- Tweak the plugin code as needed. There are no settings, and this plugin will not be updated often.
Installing Remove Dashboard Access
- Search ‘Remove Dashboard Access’ from the Install Plugins screen inside your WordPress dashboard.
- Install plugin, click Activate.
Configuring the Remove Dashboard Access Plugin
The Remove Dashboard Access plugin is fairly easy to setup as it has options that make sense.
After installing the plugin, you should have a menu item under Settings > Dashboard Access.
Once you’ve navigated to the settings page for the Remove Dashboard Access plugin, this is where we will configure how to handle non-admins.
Settings For Remove Dashboard Access
- Dashboard Access: these settings are used for deciding which default user roles have access to the WordPress dashboard.
- Advanced: Here you can specifically choose a user with a specific capability, this will work for shop managers or custom roles.
- Redirect URL: Where you want user’s to be redirected to when they try to access the WordPress dashboard.
- User Profile Access: This will allow users access to the WordPress dashboard, only to edit their profile information. See notes in Summary.
- Login Message: This will appear above the login form on the wp-login.php page.
Something For Developers
You are able to follow this guide and use code provided by Jeroen to get a deeper understanding on how the above plugins have been built and work.
You may be interested in our article for the ‘right’ way to customize WordPress when working with custom code inside your WordPress projects.
In this article you should have learned how to hide your WordPress dashboard and admin bar from non-admins by using plugins or using custom code.
This should help improve your customer’s experience overall.
Side Note: Theme My Login allows for frontend profile editing.Theme My Login is a plugin that has similar functionalities for this. However some of these features aren’t free and require a paid version of their Add Ons to achieve.
Photo by Rolands Varsbergs on Unsplash
Great ! That’s excactly what I was looking for, easy to use et doing the job. Thanks a lot
Thanks for the feedback Ben. Glad we were able to help. 🙂