X

How to Remove the Comments Column from Pages in WordPress Admin

Snippets by IsItWP

Do you want to remove the comments count column from pages in WordPress dashboard? With our snippet, it’s easy to remove the unwanted comments column from your pages. In this article, we’ll show you how to remove the comments column from pages in your WordPress dashboard.

remove comments column from pages in wordpress admin

Instructions:

All you have to do is add this code to your theme’s functions.php file or in a site-specific plugin:

function remove_pages_count_columns($defaults) {
  unset($defaults['comments']);
  return $defaults;
}
add_filter('manage_pages_columns', 'remove_pages_count_columns');

Note: If this is your first time adding code snippets in WordPress, then please refer to our guide on how to properly copy / paste code snippets in WordPress, so you don’t accidentally break your site.

If you liked this code snippet, please consider checking out our other articles on the site like: 62 best free WordPress blog themes or 7 best WordPress contact form plugins.

Comments   Leave a Reply

  1. Kevin, thanks for the share, but i want to edit your original Post. The part of code below absolutely works.

  2. Kevin, thanks for the share but i want to make one small correction to your original Post.

  3. Kevin thanx for this!

    I would like to know if I want it to remove more columns on different parts of the admin area (pages, media, posts) how I would do this? Is there a simple example you could share?

    – ENIX
    The Netherlands

    1. Hi Enix,
      Well if you look on line 3 of the code you will see the name ‘comments’ change that to the name of other columns and it will remove them. However you can also remove multiple by just adding more of the same eg:

      unset($defaults[‘comments’]);
      unset($defaults[‘other’]);
      unset($defaults[‘other’]);

      I did not test all these names however they should work for you.
      cb, title, author, categories, tags, comments, date

      1. @wpsnipp:disqus ,

        thank you, after my first reply I tried it as following and this works fine:

        function remove_pages_count_columns($defaults) {  unset($defaults[‘comments’]);  return $defaults;}add_filter(‘manage_pages_columns’, ‘remove_pages_count_columns’);function remove_media_count_columns($defaults) {  unset($defaults[‘comments’]);  unset($defaults[‘author’]);  unset($defaults[‘date’]);  return $defaults;}add_filter(‘manage_media_columns’, ‘remove_media_count_columns’);

        Again thank you for your work, alot of snippets are very handy! 🙂

        1. No problem anytime, I post new snippets everyday so visit often 🙂

      2. not working for me

  4. Daily Tip: How to Remove the Comments Count Column From WordPress Pages July 26, 2011 at 11:01 am

    […] a little trick I found over at WPsnipp.com from author Kevin Chard. Add this to your functions.php file and it will remove the comments count […]

Add a Comment Cancel reply

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our privacy policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

WordPress Launch Checklist

The Ultimate WordPress Launch Checklist

We've compiled all the essential checklist items for your next WordPress website launch into one handy ebook.
Yes, Send Me the Free eBook!