Posted By

robnilas on 01/21/17


Tagged


Versions (?)

Disable Admin Bar for All Users Except for Administrators


 / Published in: PHP
 

  1. add_action('after_setup_theme', 'remove_admin_bar');
  2.  
  3. function remove_admin_bar() {
  4. if (!current_user_can('administrator') && !is_admin()) {
  5. show_admin_bar(false);
  6. }
  7. }

Report this snippet  

You need to login to post a comment.