Advertisement
fauzanjeg

Remove Admin Bar/ToolBar Except for Admin

Mar 1st, 2021
308
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.22 KB | None | 0 0
  1. /* Remove Admin Bar/ToolBar Except for Admin */
  2. function remove_admin_bar() {
  3.     if (!current_user_can('administrator') && !is_admin()) {
  4.         show_admin_bar(false);
  5.     }
  6. }
  7.  
  8.  
  9. add_action('after_setup_theme', 'remove_admin_bar');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement