Remove Link Items From WordPress Admin Bar 3.3

This function removes links from the WordPress admin bar. You can customize by choosing which links to remove. If you want to leave one of these items in, just delete the line.

//remove stuff from new admin bar for all
function isa_admin_bar() {
    global $wp_admin_bar;

//	if (!current_user_can('manage_options')) {//only for non-admins
// or 
//	if (!current_user_can('delete_others_posts')) {//only for Author-level and below


//    $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('customize');// removes the Customize link

//	}// end only for non-admins, or end only for authors and below

}//end isa admin bar
add_action( 'wp_before_admin_bar_render', 'isa_admin_bar' );

See more: , , ,


We've One Response

Leave a Reply to Shawn Cancel reply

Your email address will not be published. All comments will be moderated.

Please wrap code in "code" bracket tags like this: