I just updated one of my blogs to the new wordpress 3.1 and i need to hide the admin menu that shows up on top of the pages. How do i disable it ?
thanks
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It only takes a minute to sign up.
Sign up to join this communityI just updated one of my blogs to the new wordpress 3.1 and i need to hide the admin menu that shows up on top of the pages. How do i disable it ?
thanks
this is the simplest way. install showhide-adminbar. then all subscriber won't see the adminbar even they set to show it in viewing site.
Go to Dashboard > Your Profile > Show Admin Bar and uncheck "when viewing site"
remove_action( 'init', 'wp_admin_bar_init' );
to your functions.php
Feb 23, 2011 at 22:47
show_admin_bar
is the correct way to do it).
This would hide the Admin Bar for all users except Administrators. Add at end of functions.php
:
function my_function_admin_bar($content) {
return ( current_user_can("administrator") ) ? $content : false;
}
add_filter( 'show_admin_bar' , 'my_function_admin_bar');
Add the following to your theme's functions.php file:
// Disable Admin Bar for all users
add_filter('show_admin_bar', '__return_false');
// Remove Admin Bar Options from all users' Profile page
add_action('admin_print_scripts-profile.php', 'hide_admin_bar_prefs');
function hide_admin_bar_prefs() {
?>
<style type="text/css">
.show-admin-bar { display: none; }
</style>
<?php
}