﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
4297	Order Comments	hyp0r	anonymous	"Allow comments to by sorted in descending order.

On some pages on my site I like to list comments with the newest comment on top. Every time that I upgrade I have to make these changes to the comment-template.php

line 280:
add ''', $order = 'ASC' ''' to the comments_template function:

{{{
function comments_template( $file = '/comments.php', $order = 'ASC' ) {
}}}


line 292, 294 & 298:
add ''' $order''' after ORDER BY comment_date

{{{
$comments = $wpdb->get_results(""SELECT * FROM $wpdb->comments WHERE comment_post_ID = '$post->ID' AND (comment_approved = '1' OR ( user_id = '$user_ID' AND comment_approved = '0' ) )  ORDER BY comment_date $order"");
}}}

With the above modifications the code will continue to work exactly the way it does now. But you can use this code:
{{{
<?php comments_template('/comments.php','DESC'); ?>
}}}
and it will display the comments in descending order.

----

I don't see any reason that this would cause any problems. I'd love to help add this feature (it's quite simple). I'm not sure how to do that, if someone could point me in the right direction I'd love to help out."	enhancement	closed	normal		General		minor	wontfix	sort comments order by	
