KWITConsulting
03 Jul 2013

How to display more than 20 WordPress comments per page

Everyone hates spam, especially when you have thousands of spam comments on your WordPress posts. What really aggravates the situation however is a easy way to handle and moderte the spam. In my case, I have thousands of spam comments.

Pending (5,235) | Approved | Spam (669) | Trash (0)

WordPress allows you to search through comments for spam keywords such as ‘cialis’, ‘viagra’, ‘xanex’ etc, however it only displays 20 results per page. This could make moderating those pending comments very taxing.

 

WordPress version 2 Solution

In older versions of WordPress prior to version 3.x admins could access the file edit-comments.php via FTP in the /wp-admin/ path.

Line 185 would look similar to this:
$comments_per_page = apply_filters('comments_per_page', 20, $comment_status);

Changing the 20 to the preferred results per page would then allow you to moderate many pending comments much faster.

WordPress version 3+ Solution

WordPress 3+ makes this much easier. From the dashboard > comments page admins can now simply click the ‘screen options’ tab near the top right, and select the number of results per page from the drop-down. Problem solved.

Wordpress Comments Screen Options

If this has helped you, sound off in the comments.

Error & Troubleshooting Leave a comment