Hide Admin Bar from Non-Admins

설명

Install, activate, and you’re done.

This plugin hides the WordPress Toolbar (admin bar) for all visitors and users without the ‘administrator’ role. It’s a very simple plugin with no settings to configure.

  • Use this plugin for sites with only one admin who needs access to the dashboard and the admin bar.
  • This plugin is super lightweight, with just a few lines of code.
  • If you need to show the toolbar for other user roles, use the filter habfna_show_admin_bar_roles.

This plugin is a tweak of the code by Yoast to hide the admin bar for non-admins only.

설치

Install Hide Admin Bar from Non-Admins from within WordPress

  1. Visit the plugins page within your dashboard and select “Add New”
  2. Search for “Hide Admin Bar from Non-Admins”
  3. Locate this plugin and click “Install”
  4. Activate “Hide Admin Bar from Non-Admins” through the “Plugins” menu in WordPress
  5. That’s it. There are no settings.

Install Hide Admin Bar from Non-Admins Manually

  1. Upload the hide-admin-bar-from-non-admins folder to the /wp-content/plugins/ directory
  2. Activate “Hide Admin Bar from Non-Admins” through the “Plugins” menu in WordPress
  3. That’s it. There are no settings.

FAQ

How do I hide the toolbar for other user roles?

If you need to show the toolbar for other user roles, use the filter habfna_show_admin_bar_roles. Here is a code recipe that demonstrates how to use this filter.

How do I block non-admins from access the WordPress admin area?

This plugin does not handle any user redirection. It’s only for hiding the admin bar. If you are building a site that needs more robust user management, consider our WordPress membership plugin, Paid Memberships Pro.

Paid Memberships Pro allows anyone to build a membership site—for free. Restrict content, accept payment, and manage subscriptions right from your WordPress admin.

I found a bug in the plugin.

Please post it in the issues section of GitHub and we’ll fix it as soon as we can. Thanks for helping. https://github.com/strangerstudios/hide-admin-bar-from-non-admins/issues

I need help installing, configuring, or customizing the plugin.

Please visit our premium support site at https://www.paidmembershipspro.com for more documentation and our support forums.

후기

2022년 2월 23일
Works perfectly. For a membership site, I don't want anyone seeing the admin bar except admins! Thank you 🙂
2021년 11월 14일
The plugin is highly efficient, Works exactly as described and expected.
2020년 5월 13일
I tried more than 5 plugins, this one is the best, it shows toolbar for admin, but it hides it from users. Thank you, you deserve this positive comment
2019년 12월 31일
Works like a charm! It just deactivated WP admin bar for everyone else except Administrators. Thank you!
모든 29 평가 읽기

기여자 & 개발자

“Hide Admin Bar from Non-Admins”(은)는 오픈 소스 소프트웨어입니다. 다음의 사람들이 이 플러그인에 기여하였습니다.

기여자

자국어로 “Hide Admin Bar from Non-Admins”(을)를 번역하세요.

개발에 관심이 있으십니까?

코드 탐색하기는, SVN 저장소를 확인하시거나, 개발 기록RSS로 구독하세요.

변경이력

1.0.1 – 2022-04-11

  • ENHANCEMENT: Added habfna_show_admin_bar_roles filter to show the admin toolbar for additional roles.
  • BUG FIX: Fixed code to hide the admin bar from non-admins when viewing the Edit Profile WordPress admin page.

1.0

  • Initial version of the plugin.