Skip to content

Instantly share code, notes, and snippets.

@halgatewood
Created June 15, 2013 03:15
Show Gist options
  • Save halgatewood/5786730 to your computer and use it in GitHub Desktop.
Save halgatewood/5786730 to your computer and use it in GitHub Desktop.
Remove WP Admin Bar Extras
// ADMIN BAR UPDATES
function hg_remove_admin_bar_links()
{
global $wp_admin_bar;
$wp_admin_bar->remove_menu('wp-logo'); // Remove the WordPress logo
$wp_admin_bar->remove_menu('about'); // Remove the about WordPress link
$wp_admin_bar->remove_menu('wporg'); // Remove the WordPress.org link
$wp_admin_bar->remove_menu('documentation'); // Remove the WordPress documentation link
$wp_admin_bar->remove_menu('support-forums'); // Remove the support forums link
$wp_admin_bar->remove_menu('feedback'); // Remove the feedback link
$wp_admin_bar->remove_menu('updates'); // Remove the updates link
$wp_admin_bar->remove_menu('comments'); // Remove the comments link
}
add_action( 'wp_before_admin_bar_render', 'hg_remove_admin_bar_links' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment