Hack WordPress, Edit More Default Comments & Save Time

Hack WordPress, Edit More Default Comments & Save Time

wordpress comments editor image

This tutorial explains how to increase the default number of comments shown on the WordPress Admin Comments Editor page, by editing edit-comments.php.

Dunno about you, but life’s too short to be clicking thru’ all those view/edit comments pages, with only 20 listed by default per page. Let’s sort that.

Problem: Too darned popular. OK .. maybe it’s all the damn spam, mam.

Solution: Hack the WordPress code.

So I get back from a few days hols and, having clearly neglected my blog, crack it open to find a fistful of comments. Shucks. I can feel a hack coming on.

Googling “wordpress how display more than 20 comments”, up pops the splendid Woopran John P’s OneMansBlog, a resource that rarely fails to tease. Then again, being WordPress, John’s fix is outdated, so I figured I’d tweak his solution, and here’s the deal. (Course, this fix will be outfoxed eventually too. Such is strife.)

Goto the root of your WordPress installation and, from there, open the file wp-admin/edit-comments.php

Search for the line:-

1.$comments_per_page = 20;

Swap the default 20 to however many comments you want to see per page. I figure 50 comments is about right for guvnr.

Save the file.

Thassit. Except ..

When you upgrade WordPress, you’ll have to do that again but, hey, it’s a whole lot quicker than clicking through all those pages, so you will save lots of time.

%d bloggers like this: