Site icon Shyam Makwana

WordPress : Increase/Decrease comments per page in admin side

wordpress change Comments per page

wordpress change Comments per page

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 ;
    
}

Exit mobile version