How to remove menu items from WordPress 3.3 Admin bar?

If you wish to remove the default wp menu in the admin bar of WordPress 3.3+, include the following snippet in the file: function.php

function cj_admin_bar() {
 global $wp_admin_bar;
 $wp_admin_bar->remove_menu('wp-logo');
 $wp_admin_bar->remove_menu('about');
 $wp_admin_bar->remove_menu('wporg');
 $wp_admin_bar->remove_menu('documentation');
 $wp_admin_bar->remove_menu('support-forums');
 $wp_admin_bar->remove_menu('feedback');
 $wp_admin_bar->remove_menu('view-site');
}
add_action( 'wp_before_admin_bar_render', 'cj_admin_bar' );

OR

To remove the admin bar completely from the backend and optimize performance, install this wordpress plugin:

CJ Remove WP Toolbar

Published by Shibu Lijack

Frontend Web Developer | Music Enthusiast | Foodie | Technophile

Leave a comment

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: