Ask questions about WordPress courses

Hiding the number of comments in the WordPress admin

The article will be useful for those, who, like me, uses static pages to display a non-standard type of content. When you need to display content in several columns or add a slider to it, at the same time, it is pointless to leave comments in the admin panel for such pages.

Today I will tell, how to remove the column for the number of comments in the list of pages published on the site. For this I have a prepared code snippet, which needs to be inserted into the functions.php file of your template.

Code to hide the number of comments

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

Code protested, everything works great. Good luck in website development.


Купить хостинг WordPress
WordPress tutor
Online tutoring services. List of courses I teach
  • Basic web design course;
  • Site layout;
  • General course on CMS WordPress and continuation of the course on template development;
  • Website development in PHP.
Read more on the page WordPress tutor
*/

Nikolaenko Maxim

Director of web studies ProGrafika. I am developing, website design and promotion. Always glad to new blog readers and good clients.


You may also like...

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Templates for WordPress
The best hosting in Ukraine
Stable hosting for Drupal