How to hide the “Admin Bar” from website subscribers?

In WordPress, it is by default that the “Admin Bar” (the black bar on the top most bar of the web page) be shown to any member who has logged in. However, for subscribers, the “Admin Bar” usually adds little values. The following block of code will remove the “Admin Bar” from website subscribers:

if (current_user_can('manage_options')) {
	add_filter('show_admin_bar', '__return_true');
	add_filter('show_admin_bar', '__return_false');

Simply code and paste the code to the functions.php file of your current theme and refresh the browser to see the change.



Please login to post comments.

Login thru Twitter / Facebook


Log in with Facebook