Return to Snippet

Revision: 51907
at October 7, 2011 01:38 by priyankvira


Initial Code
function my_function_admin_bar($content) {
    return ( current_user_can("administrator") ) ? $content : false;
}
add_filter( 'show_admin_bar' , 'my_function_admin_bar');

Initial URL
http://priyankvira.com

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

Initial Title
Disable Wordpress Admin Bar for All Users Except Administrators

Initial Tags
wordpress

Initial Language
PHP