Remove comments link from admin bar

Adding this snippet to the functions.php of your wordpress theme will remove the comment link from the admin bar.

 

 

function remove_comments(){
global $wp_admin_bar;
$wp_admin_bar->remove_menu('comments');
}
add_action( 'wp_before_admin_bar_render', 'remove_comments' );

Be Sociable, Share!

Leave a comment