How to Disable WordPress Admin Bar for All Users Except Administrators
HTML-код
- Опубликовано: 14 фев 2021
- Do you want to disable the WordPress admin bar for any or specific users on your site? WordPress has a method for manually disabling the admin bar per user but that is not feasible if you have a lot of registered users on your site. In this article, we'll show you how to disable the WordPress admin bar for all users except administrators.
This video brought to you by SeedProd, the best WordPress landing and page builder plugin available, take a look at their site here:
=================================
www.seedprod.com/
=================================
For our discount use the code: WPBVIP
There are a few different methods to do this and for the first option, we would recommend going under Users, All Users and click on edit beneath the user you want to hide the admin bar from. You should scroll down and in the options, there will be the Toolbar option to show the toolbar when viewing the site and uncheck it.
To limit the admin bar based on user role, you would want to install and activate the Hide Admin Bar Based on User Roles plugin. Under Settings, Hide Admin Bar Settings you can check the box next to the role where you would like to hide the admin bar. The plugin download link can be found below.
wordpress.org/plugins/hide-ad...
For our other methods, we have the code written in our article where you can copy it from and the link to that article is below.
www.wpbeginner.com/wp-tutoria...
For the added code, you would need to go under Appearance, Theme Editor, and find the functions.php file also titled theme functions. Scroll to the bottom and add the code from the article. The first code will disable the code for all users except the admin while the second code will disable it for everyone.
If you liked this video, then please Like and consider subscribing to our channel here for more WordPress videos.
ruclips.net/user/subscription_...
Feel free to take a look at the written version of this tutorial here:
www.wpbeginner.com/wp-tutoria...
Join our group on Facebook
/ wpbeginner
Follow us on Twitter
/ wpbeginner
Check out our website for more WordPress Tutorials
www.wpbeginner.com
#WordPress #WordPressTutorial #WPBeginner - Хобби
This tutorial has saved me battling with a user that I kept removing but kept registering. Thank you so much
Glad it helped!
Hats off to your dedication for producing such high quality videos!
Glad you like them!
I used the plugin option and I am delighted. Thank you for your tutorial.
Glad you found the plugin helpful!
Great tutorial! Right to the point! Thank you!
Glad it was helpful!
Thank you. Thank you. Thank you. 🙏. I needed this and you made my day.
Glad we could help :)
Great tutorial. I'd must probably use the code method. Pretty easy and straight forward.
Glad you like our tutorial, whichever method you prefer is likely best for you :)
thank you very much for this tutorial! the plugin method is so easy.
Glad it was easy!
I went ahead and installed the plugin - easy peasy.
Glad it was easy :)
I have been looking for this. Thank you
You're welcome!
Thank you and Thank you for your brilliant tutorial.
You're welcome, glad you found our tutorial helpful!
thank you so much you are great teacher..
You are welcome!
Really helpful for me Thanks for sharing
Glad it was helpful :)
Thank you so much.. Long live and help others madam.. ⚘
You're welcome :)
Thanks, the custom code worked.
Glad it worked :)
Thank youuu so much!
You're welcome!
omg you're like an god for me mam, really thank you!
Glad our guide was helpful!
thanks a lot mam. It worked.
You're welcome :)
Thank you so much
You're most welcome!
Thanks a lot...It worked
You're welcome!
Thanks team!
You're welcome :)
good information
Thanks :)
Thanks a lot
You're welcome :)
I will probably use the plugin
Sounds like a plan :)
Thank u soooo much best video for hiding admin bar from pakistan
Glad you found our guide helpful :)
Good tutorial! Thanks for making it. Already being an overuser of plugins, I'd prefer the code method, specifically the third one you provided code for. However, what would the code be if you wanted the admin bar to remain for both Administrators and Editors? I often grant my clients Editor privileges and would want them to have use of the AB.
You may want to take a look at the page below for that:
wordpress.stackexchange.com/questions/131814/if-the-current-user-is-an-administrator-or-editor
sorry to be off topic but does anyone know a tool to log back into an Instagram account..?
I somehow forgot the account password. I would love any tips you can offer me.
@Ellis Clark instablaster ;)
@Finn Javier I really appreciate your reply. I got to the site on google and I'm in the hacking process atm.
Seems to take a while so I will reply here later when my account password hopefully is recovered.
@Finn Javier it did the trick and I now got access to my account again. Im so happy:D
Thanks so much, you saved my ass !
Tanks ❤❤
You're welcome :)
Thank you!, it really helped, I've had a strange issue, a new theme I installed and it suddenly gave me the top admin bar for the guest users! not for logged in users so it was saying like: hey! people, come and use wordpre!!." so now it is gone, Thank you.🌻
You're welcome, glad our guide was helpful!
Great and how do you remove the left menu for logged-in users when they get to the backend? There at times is full of notices from plugin ads sales and not relevant to logged in users.
For that, you would want to take a look at our article below:
www.wpbeginner.com/plugins/how-to-hide-unnecessary-items-from-wordpress-admin-with-adminimize/
Thanks! This helped a lot!
Do you know if there is a way to display the name of who reviews an article? Just like in healthline's posts, where they show who wrote the article and who reviewed it. Thank you!!
It would depend on the system you are using for reviews some offer that display built-in while others you could use the comments for who reviewed.
@@wpbeginner Thanks for the reply! I searched for a plugin that offers a display built-in but I couldn't find it. Do you know any plugin that can do it?
Thank you for your great content. I have tried your coding way but on my website still shows the bar with wp login option. I have tried other ways but still shows even on other devices. Is there any help for that?
If one method does not work for your specific site, we would first recommend trying another method to see if that other method would work for you.
I have Hide Admin Bar Based on User roles but in a test when I added wp-admin to the end of the website URL it allowed the user to see the admin directory, not just the bar, it had access to pages and everything. ?
The plugin is used to hide the admin bar at the top of the page, not remove access to the wp-admin area of your WordPress site.
If you mean a user could see and edit the other sections, you would want to ensure that they are a subscriber role and that their role has the correct permissions. You can see more in our article below!
www.wpbeginner.com/beginners-guide/wordpress-user-roles-and-permissions/
What do I do if the options dont work? I tried the plugin and then tried the code for option 3 and the admin bar is still at the top while I'm signed out and on an incogneto page 🤷♂
If you haven't already, we would recommend clearing the caching on your site as the most common reason for that issue.
We have sites where we have shop managers and all i want them to have in the admin toolbar is the ability to get to the admin dashboard and back to the front end. Any ideas on this?
We would recommend taking a look at the adminimize plugin for customizing what appears in the toolbar:
wordpress.org/plugins/adminimize/
Rather than hide complete bar - how do I hide/show/add specific links people see in admin toolbar for different user roles?
While we don't have a tutorial for the conditional logic for what you're wanting, you would want to take a look at our article below for a starting point:
www.wpbeginner.com/wp-tutorials/how-to-add-custom-shortcut-links-to-wordpress-toolbar/
my issue is that my dashboard shows up when people pull up my website, how do i fix that?
We're not sure what you mean, if you mean your homepage is redirecting to your wp-admin even in incognito mode then you would want to check with your host to see if you have a redirect set up.
The plugin doesn't seem to be working for me. I've cleared cache on browsers and tried using private mode and the admin bar still shows up. Any advice?
If your plugin is up to date we would recommend reaching out to the plugin's support and they should be able to assist with what may be causing the issue.
Hi, could you please help me..
now my problem all of user role except administrator can't view the dashboard...
please how to solve ?
You should be able to add /wp-admin to the end of your URL to go to the admin area of your site.
Thanks! it really was annoying!
Glad our guide was helpful :)
Please help me with a solution. I am trying for hours! How can I hide the contact email adress and the gravatar inside my article? I can't find a way to hide the gravatar and the general email adress! Thank you
You would want to reach out to the support for your specific theme as your theme would determine how that content shows on your site. You may also want to check your site using an incognito/private browser as the email address would normally only show if you are someone who can moderate comments on your site.
1st comment
:)
Can i see my wordpress website logginers information like id and password
While not their password, you can see their username and email under Users>All Users
Can you explain how a website is developed, I mean some people develop PHP file some develop SQL some JSON the how are the assembled in a company?
Who assembles it ,the CEO ?
And how do the stop employees from stealing the scripts ?
For a better understanding, you would want to take a look at our video below:
ruclips.net/video/50m263vX0Uw/видео.html
@@wpbeginner i know these . Im taking about some advanced website .
How are the files assembled and who has access to the hosting of the company ?
@@wpbeginner like in a video streamming site , someone makes the php file some one css and some sql ......the who are these files send to and who uploads these files in the hosting .
Admin bar is still available
You would want to check with the plugin's support to see why it is not working for your specific theme/site.
hide admin bar. easy as pie
Glad our guide could make things easy :)
weird none of them worked for me.
If none of the methods worked, we would recommend trying to disable your plugins to see if one of your plugins is overriding the settings.
Thank you so much
You're most welcome