Feb

18

Disable WordPress Admin Bar for non-Admins

Posted by 1 Comment

If you want to disable the WordPress Admin Bar for regular users, all you need to do is add a couple of lines to your functions.php file.

1
2
3
if (!current_user_can('manage_options')) {
  add_filter('show_admin_bar','__return_false');
}


Just add the above code to the bottom of your functions.php file and only Admins will now see the bar.

Category: Development, Web Development, WordPress

Comments (1)

Trackback URL | Comments RSS Feed

  1. Thanks for share, it’s worked.

Leave a Reply