Archive for the tag 'Reverse Comments'

Reverse the order of comments without editing theme

I was looking for a way to reverse the order in which comments are displayed in a WordPress blog for one of my projects. After a bit of Googling I found a Plugin called Reverse Order Comments. A quick look into the source code revealed that it was rewriting the comment template and you need to edit the theme to make it work. My instinct told me that it would be easy to accomplish it using the array_reverse comment in PHP.

I followed my instinct and tried to see whether it is possible to do it in a simple way. In the end I accomplished it with less than 10 lines of code and more importantly without the need to edit the theme files. Another instance of the KISS principle in action ;-)

I packed it as a Plugin so that you can just drop it into your plugins directory, activate it and then forget about it. It is called Simple Reverse Comments and you can download it from my Plugins page.