Hide comments column in WordPress backend

Is there a way to hide the comments column in the backend? When you look at the pages, there’s a comments column even though I’ve disabled them.

I made WordPress into a CMS and it may cause some confusion.

Related posts

Leave a Reply

2 comments

  1. Try this:

    add_filter("manage_edit-page_columns", "my_page_edit_columns");
    
    function my_page_edit_columns($columns){
      unset($columns['comments']);
    
      return $columns;
    }
    

    If you need it for posts instead of pages, use manage_edit-post_columns instead. The same goes for any post type, really, as manage_edit-{post_type}_columns.

  2. Another way to ensure that the comments column is removed from all Post types and not just Pages, use the following instead:

    add_filter( 'comments_array', 'wpse_19986_existing_comments', 10, 2 );
    function wpse_19986_existing_comments( $comments ) {
        $comments = array();
        return $comments;
    }
    

    You can also look into the Disable Blogging plugin which extensively disables the comment functionality among other blog-related features that are needed when using WordPress as a static CMS.