Plugin Directory

Reverse Order Comments

Allows to display the comments in reverse order. Latest comment first, oldest last.

Download Version 1.0.2

Archive contents

reverse-order-comments.php      The plugin itself

  theme-examples/
    default                      (English default theme)
      comments-topinput.php      comments.php adapted for a guestbook (engl)
      tpl_guestbook.php          template for a guestbook (engl)

    default_de                   (German default theme)
      comments-topinput.php      comments.php adapted for a guestbook (engl)
      tpl_gaestebuch.php         template for a guestbook (engl)

Usage

To use the new function you need to implement it in your templates.

If you want your comments to be displayed in reverse order in every post, you need to replace in file "single.php" the line

<?php comments_template(); ?>

with

<?php if(function_exists('ro_comments_template')) ro_comments_template(); else comments_template(); ?>

Building a guestbook for the Kubrik theme

Precondition: comments-topinput.php and tpl_gaestebuch.php are in in your template directory.

  1. Create a new page. Title e.g. "guestbook"
  2. Allow comments for this page
  3. Choose the template "Guestbook" for this page.

Done!

If you want the comment input fields "blogstyle" at the bottom of the page, just change inside tpl_gaestebuch.php the line

<?php if(function_exists('ro_comments_template')) ro_comments_template("/comments-topinput.php"); else comments_template(); ?>

to

<?php if(function_exists('ro_comments_template')) ro_comments_template(); else comments_template(); ?>

Building a guestbook for other themes

If you don't use the Kubrik/Default theme, it is still very easy to build your own template. A good template to start with is "page.php" and "single.php". Copy "page.php" and rename it. The line <?php comments_template(); ?> is important. Change it as described above. Add a header to your new page, to tell WordPress it is a template.

e.g.

<?php
/*
Template Name: Guestbook
*/
?>

Page Template Documentation

Technical

This Plugin is really simple. Just the original comments_template() function with modified SQL queries. If you use your own comments.php you can change the the function parameter to your own file. But if you do stuff like this, you may already now this.

Tested up to WordPress 2.5.1

Feedback

If you use this plugin, please leave a comment or trackback/pingback on the plugin site.

For Feedback of any kind, this is the right place, too.

Requires: 1.5 or higher
Compatible up to: 2.5
Last Updated: 2008-5-18 Downloads: 8,230

Average Rating

5 stars
4 stars
3 stars
2 stars
1 star
(7 ratings)

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

Log in to vote.

100,2,2
0,4,0
100,1,1
0,1,0