Removing the Admin bar for members
Posted: March 28th, 2011, 10:22 pm
Hey Jason
Maybe you can have an option to remove the WP top admin/user bar in your next release...Not sure why WP don't have an option for that but I find it really annoying....and somehow branding your site as everybody else.
I know you can remove it by editing each user option but If you have thousands it will be impossible unless you inject the db....
Here is a temp solution i found but It would be nice if you can come up with something..
in your functions.php
add this line on top
that will remove the top admin bar to all users...Not for the admin...this way you still have access to it's usability
Sam
P.S. Please look into my other post Jason...Thank you
http://www.primothemes.com/forums/viewtopic.php?f=4&t=2838
Maybe you can have an option to remove the WP top admin/user bar in your next release...Not sure why WP don't have an option for that but I find it really annoying....and somehow branding your site as everybody else.
I know you can remove it by editing each user option but If you have thousands it will be impossible unless you inject the db....
Here is a temp solution i found but It would be nice if you can come up with something..
in your functions.php
add this line on top
- Code: Select all
<?php
function my_function_admin_bar($content) {
return ( current_user_can("administrator") ) ? $content : false;
}
add_filter( 'show_admin_bar' , 'my_function_admin_bar');
?>
that will remove the top admin bar to all users...Not for the admin...this way you still have access to it's usability
Sam
P.S. Please look into my other post Jason...Thank you
http://www.primothemes.com/forums/viewtopic.php?f=4&t=2838