Posted By

priyankvira on 10/07/11


Tagged

wordpress


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

srdjan


Disable Wordpress Admin Bar for All Users Except Administrators


 / Published in: PHP
 

URL: http://priyankvira.com

Add the line of code to your theme's function.php file

  1. function my_function_admin_bar($content) {
  2. return ( current_user_can("administrator") ) ? $content : false;
  3. }
  4. add_filter( 'show_admin_bar' , 'my_function_admin_bar');

Report this snippet  

You need to login to post a comment.