Remove Items from WordPress 3.3 Admin Bar
The good people of Automattic recently introduced version 3.3 of WordPress. I have noticed that one of the new features is a new, always present admin bar.
![]()
The admin bar allow you to quickly view your site’s comments and add new posts, pages etc. A lot of the client WordPress sites I build don’t actually make use of the blogging functionality of WordPress. We often use custom post types to display information.
Here is a way of removing the comment link and + new options.
Pop this bit of code into your themes functions.php file to remove.
function remove_admin_bar_links() {
global $wp_admin_bar;
$wp_admin_bar->remove_menu('comments');
$wp_admin_bar->remove_menu('new-content');
}
add_action( 'wp_before_admin_bar_render', 'remove_admin_bar_links' );