Skip to content

Instantly share code, notes, and snippets.

@beatak
Created April 6, 2011 05:57
Show Gist options
  • Save beatak/905211 to your computer and use it in GitHub Desktop.
Save beatak/905211 to your computer and use it in GitHub Desktop.
Disable admin bar
<?php
add_filter( 'wp_loaded', 'whatever_yours');
function whatever_yours() {
wp_deregister_script('admin-bar');
wp_deregister_style('admin-bar');
remove_action('wp_head', 'wp_admin_bar_header');
remove_action('wp_head', 'wp_admin_bar_render', 1000);
remove_action('wp_head', '_admin_bar_bump_cb');
remove_action('wp_footer', 'wp_admin_bar_render', 1000);
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment