WordPress : Increase/Decrease comments per page in admin side

Sometimes when you install sample data or check live site, there are lots of spam shows in comments in admin panel. By default WordPress admin panel shows 20 comments in a page. So that it becomes boring when you want to delete large number of comments.

When I was in need I have googled and found out below code, that will help you to increase number of comments per page in admin panel. By that you can delete more comments. Just paste below code in your active theme’s functions.php file.


add_filter('comments_per_page', 'increase_count', 99, 2);
function increase_count($no, $comment_status){
    return 50 ;
    
}

Shyam has written 29 articles

Shyam is senior full stack developer, who loves to explore new technologies and work on them. He's passionate about coding so can code 24/7. He uses PHP as a backend programming language.

He knows Laravel, MySQL, AngularJS, ReactJS, Redis, Kubernetes, Git, CodeIgniter, PHP, MVC pattern, Lodash, jQuery, VanilaJS, Teamcity and many other technologies and tools.

Shyam writes notes and hacks on his blog (https://shyammakwana.me). In spare time he can be found @ StackOverflow or crafting any new open source application.

Passionate Programmer and Meditator #PERIOD.