Want to know what WordPress Theme a site is using? Check Out Now!

How to Remove Comments from WordPress Admin Bar?

Are you looking for a way to remove comments from the WordPress admin bar?

By default, WordPress displays an icon for comments in the WordPress admin bar at the top.

You can disable the comments from the top admin bar in WordPress using the below code snippet.

/**
 * Remove Comments from WordPress admin bar
 */
function maverick_remove_comments_from_wordpress_admin_bar(){
    global $wp_admin_bar;
    $wp_admin_bar->remove_menu('comments');
}
add_action( 'wp_before_admin_bar_render', 'maverick_remove_comments_from_wordpress_admin_bar' );

Leave a Reply

Your email address will not be published. Required fields are marked *