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.
- Creating new pages in WordPress through code
- Developing WordPress Plugins in Github
- Completely rewrote WP-IRC Plugin
- WordPress Plugin to add Foss.in badge
- Posts By Tag Plugin now supports excluding current post
- Started tracking time spend on my pet projects
- Bulk Delete Plugin now supports deleting by permalink
- Adopted Cron debug log WordPress Plugin
- Phishing attempts to get your wordpress.org password
- Generating dynamic files for download from PHP