Disable Subscriber WordPress Admin Bar

, , , , , ,

In this article I will show you how to quickly and easily add a script to your child theme functions.php file which will block access to the WP Admin bar and backend for anyone with the Subscriber role.

 

Block Subscriber WP Admin Bar Access

To disable the WordPress Admin Bar and WordPress Admin Backend access for users with the Subscriber role, you can add the following code to your theme’s functions.php file (Remember to back up your website before making any changes):

 

 

This script checks if the logged-in user has the Subscriber role and, if so, hides the WordPress Admin Bar and redirects them away from the WordPress Admin Backend area if they attempt to access it.

 

Conclusion

I welcome your thoughts, questions or suggestions on my article on blocking Subscriber access to the WP Admin bar and Admin backend.

You may support my work by sending me a tip using your Brave browser or by sending me a one time donation using your credit card.

Let me know if you found any errors within my article or if I may further assist you by answering any additional questions you may have.