Home / admin / Remove comments link from admin bar
  • How to Remove comments link from admin bar

    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.

    ( click code to copy )

    wordpress snippet : PHP

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

    ( WordPress codex functions, hooks, in this snippet. )

    add_action, wp,