Conversation
supportI noticed that just removing the ‘wp_admin_bar_init’ action doesn’t fully disable the admin bar. In admin-header.php, the class ‘admin-bar’ still gets added to the the body tag which results in a 28px padding getting added to the top of the body. A more effective way to remove the admin bar would be: add_filter(‘show_admin_bar’, ‘__return_false’); Hope that helps. http://wordpress.org/extend/plugins/disable-admin-bar/
thanks for posting this!
Thank you for this… this works again… the remove wp-admin-bar-init code within the functions.php worked until the latest nightly…. this was a great find thanks for this. Go figure, i searched and searched on how to get this…now I don’t want it lol.
I have found this combination works great in version 3.2.1 popped in functions.php. Since tweaking it I now have faster load timesi in both the front and back end of my blogs. // Disable the Admin Bar add_filter( 'show_admin_bar', '__return_false' ); wp_deregister_script('admin-bar'); wp_deregister_style('admin-bar'); remove_action('wp_footer','wp_admin_bar_render',1000); // Remove the Admin Bar preference in user profile */ 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 }
thanks for posting this!
Thank you for this… this works again… the remove wp-admin-bar-init code within the functions.php worked until the latest nightly…. this was a great find thanks for this. Go figure, i searched and searched on how to get this…now I don’t want it lol.
I have found this combination works great in version 3.2.1 popped in functions.php. Since tweaking it I now have faster load timesi in both the front and back end of my blogs. // Disable the Admin Bar add_filter( 'show_admin_bar', '__return_false' ); wp_deregister_script('admin-bar'); wp_deregister_style('admin-bar'); remove_action('wp_footer','wp_admin_bar_render',1000); // Remove the Admin Bar preference in user profile */ 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 }