WordPress order of comments

floppes

New Member
Messages
3
Reaction score
0
Points
0
I am trying to change the ordering of the comments on my WordPress blog, so that it will show the newest comment on top. I tried it in the settings, but it didn't take effect...
 

xPlozion

New Member
Messages
868
Reaction score
1
Points
0
find the file that handles showing comments and alter the mysql query to order it by the timestamp in descending order (DESC)
 

leafypiggy

Manager of Pens and Office Supplies
Staff member
Messages
3,819
Reaction score
163
Points
63
Are you using a system such as WP-SuperCache?

This cache's your blog's info for faster loading times, but changes may not show until the cache is deleted and recreated.
 

floppes

New Member
Messages
3
Reaction score
0
Points
0
Inside wp-includes/comment.php you can find the function "get_comments" and the SQL request: "SELECT * FROM $wpdb->comments WHERE $post_where $approved ORDER BY $orderby $order $number". $orderby is a parameter of this function and since WordPress 2.7 you can set the sort order in the admin panel, where I set it correctly.

Yes I am using SuperCache. But eben when I disable it the comments are still in the wrong order...
 
Top