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
  • ХоббиХобби

Комментарии • 107

  • @olivianambi6584
    @olivianambi6584 2 года назад

    This tutorial has saved me battling with a user that I kept removing but kept registering. Thank you so much

  • @plerdy
    @plerdy 3 года назад

    Hats off to your dedication for producing such high quality videos!

  • @tartanrambo
    @tartanrambo Год назад

    I used the plugin option and I am delighted. Thank you for your tutorial.

    • @wpbeginner
      @wpbeginner  Год назад

      Glad you found the plugin helpful!

  • @atrave01
    @atrave01 Год назад +1

    Great tutorial! Right to the point! Thank you!

  • @seansnider
    @seansnider 3 года назад +2

    Thank you. Thank you. Thank you. 🙏. I needed this and you made my day.

  • @aci25v
    @aci25v 2 года назад

    Great tutorial. I'd must probably use the code method. Pretty easy and straight forward.

    • @wpbeginner
      @wpbeginner  2 года назад +1

      Glad you like our tutorial, whichever method you prefer is likely best for you :)

  • @Sports-tv4gb
    @Sports-tv4gb Год назад

    thank you very much for this tutorial! the plugin method is so easy.

  • @mjvaquatics2626
    @mjvaquatics2626 3 года назад

    I went ahead and installed the plugin - easy peasy.

  • @joshwzr1257
    @joshwzr1257 11 месяцев назад

    I have been looking for this. Thank you

  • @realtrendingfact
    @realtrendingfact Год назад

    Thank you and Thank you for your brilliant tutorial.

    • @wpbeginner
      @wpbeginner  Год назад

      You're welcome, glad you found our tutorial helpful!

  • @Santosh_Ranawat
    @Santosh_Ranawat Год назад

    thank you so much you are great teacher..

  • @habibullah-hk
    @habibullah-hk 2 года назад

    Really helpful for me Thanks for sharing

  • @AzharUdin
    @AzharUdin 2 года назад

    Thank you so much.. Long live and help others madam.. ⚘

  • @learnjamaica3105
    @learnjamaica3105 3 года назад

    Thanks, the custom code worked.

  • @ilianasam6814
    @ilianasam6814 5 месяцев назад

    Thank youuu so much!

  • @sevenzerosRealm
    @sevenzerosRealm Год назад

    omg you're like an god for me mam, really thank you!

  • @mohammadalaminsiam711
    @mohammadalaminsiam711 2 года назад

    thanks a lot mam. It worked.

  • @anushapais9177
    @anushapais9177 Год назад

    Thank you so much

  • @debasishrath9839
    @debasishrath9839 3 года назад

    Thanks a lot...It worked

  • @iamrahulkesharwani
    @iamrahulkesharwani 2 года назад

    Thanks team!

  • @WhydoeslovehurtsogoodChannel
    @WhydoeslovehurtsogoodChannel 6 месяцев назад

    good information

  • @HardikSharmaJEE
    @HardikSharmaJEE 3 года назад +1

    Thanks a lot

  • @rachelborhauer3433
    @rachelborhauer3433 3 года назад +1

    I will probably use the plugin

  • @sabasajid9990
    @sabasajid9990 2 года назад

    Thank u soooo much best video for hiding admin bar from pakistan

    • @wpbeginner
      @wpbeginner  2 года назад

      Glad you found our guide helpful :)

  • @iwbowden
    @iwbowden 3 года назад +2

    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.

    • @wpbeginner
      @wpbeginner  3 года назад

      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

    • @ellisclark3024
      @ellisclark3024 2 года назад

      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.

    • @finnjavier8509
      @finnjavier8509 2 года назад

      @Ellis Clark instablaster ;)

    • @ellisclark3024
      @ellisclark3024 2 года назад

      @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.

    • @ellisclark3024
      @ellisclark3024 2 года назад

      @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 !

  • @ModelBusiness2020
    @ModelBusiness2020 3 года назад

    Tanks ❤❤

  • @wangzig9800
    @wangzig9800 11 месяцев назад

    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.🌻

    • @wpbeginner
      @wpbeginner  11 месяцев назад

      You're welcome, glad our guide was helpful!

  • @pete9364
    @pete9364 2 года назад +1

    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.

    • @wpbeginner
      @wpbeginner  2 года назад +1

      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/

  • @LMSftw
    @LMSftw 3 года назад

    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!!

    • @wpbeginner
      @wpbeginner  3 года назад +1

      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.

    • @LMSftw
      @LMSftw 3 года назад

      @@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?

  • @motlaghmc6973
    @motlaghmc6973 11 месяцев назад

    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?

    • @wpbeginner
      @wpbeginner  11 месяцев назад

      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.

  • @ayumetrix6851
    @ayumetrix6851 Год назад

    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. ?

    • @wpbeginner
      @wpbeginner  Год назад +1

      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/

  • @thegreatjeffmac
    @thegreatjeffmac Год назад

    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 🤷‍♂

    • @wpbeginner
      @wpbeginner  Год назад

      If you haven't already, we would recommend clearing the caching on your site as the most common reason for that issue.

  • @JasonNeri
    @JasonNeri 8 месяцев назад

    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?

    • @wpbeginner
      @wpbeginner  8 месяцев назад

      We would recommend taking a look at the adminimize plugin for customizing what appears in the toolbar:
      wordpress.org/plugins/adminimize/

  • @fastteddyb
    @fastteddyb 3 года назад

    Rather than hide complete bar - how do I hide/show/add specific links people see in admin toolbar for different user roles?

    • @wpbeginner
      @wpbeginner  3 года назад

      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/

  • @WhydoeslovehurtsogoodChannel
    @WhydoeslovehurtsogoodChannel 6 месяцев назад

    my issue is that my dashboard shows up when people pull up my website, how do i fix that?

    • @wpbeginner
      @wpbeginner  6 месяцев назад

      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.

  • @TheSpiritualNomad
    @TheSpiritualNomad 2 года назад

    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?

    • @wpbeginner
      @wpbeginner  2 года назад +1

      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.

  • @Kobbom
    @Kobbom 3 года назад

    Hi, could you please help me..
    now my problem all of user role except administrator can't view the dashboard...
    please how to solve ?

    • @wpbeginner
      @wpbeginner  3 года назад

      You should be able to add /wp-admin to the end of your URL to go to the admin area of your site.

  • @PedroGarcia-hn2qn
    @PedroGarcia-hn2qn 2 года назад

    Thanks! it really was annoying!

    • @wpbeginner
      @wpbeginner  2 года назад

      Glad our guide was helpful :)

  • @Cabure1908
    @Cabure1908 2 года назад

    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

    • @wpbeginner
      @wpbeginner  2 года назад

      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.

  • @NiroshNeminda
    @NiroshNeminda 3 года назад

    1st comment

  • @kamaru9351
    @kamaru9351 3 года назад

    Can i see my wordpress website logginers information like id and password

    • @wpbeginner
      @wpbeginner  3 года назад

      While not their password, you can see their username and email under Users>All Users

  • @vrugepost7170
    @vrugepost7170 3 года назад

    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 ?

    • @wpbeginner
      @wpbeginner  3 года назад

      For a better understanding, you would want to take a look at our video below:
      ruclips.net/video/50m263vX0Uw/видео.html

    • @vrugepost7170
      @vrugepost7170 3 года назад

      @@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 ?

    • @vrugepost7170
      @vrugepost7170 3 года назад

      @@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 .

  • @ranjitbarnala2829
    @ranjitbarnala2829 3 года назад

    Admin bar is still available

    • @wpbeginner
      @wpbeginner  3 года назад

      You would want to check with the plugin's support to see why it is not working for your specific theme/site.

  • @christopherraymond3323
    @christopherraymond3323 2 года назад

    hide admin bar. easy as pie

    • @wpbeginner
      @wpbeginner  2 года назад

      Glad our guide could make things easy :)

  • @ritchiebaldonado1911
    @ritchiebaldonado1911 3 года назад

    weird none of them worked for me.

    • @wpbeginner
      @wpbeginner  3 года назад

      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.

  • @rajendrabogati3670
    @rajendrabogati3670 3 года назад

    Thank you so much