Title: Issue with sorting
Last modified: August 30, 2016

---

# Issue with sorting

 *  [dragolcho](https://wordpress.org/support/users/dragolcho/)
 * (@dragolcho)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/issue-with-sorting/)
 * Hi Guys,
 * First of all great work with the plugin. I am using it as a light-weight Forum
   Solution for one of my experimental projects.
 * My question is the following:
    – How can affect the sorting of the topics inside
   a Forum. I want to have the topics with most recent replies appear on the top
   of the list. – Currently I am getting a seemingly random order of the topics (
   although it stays the same). – In the current example (see the link below) I 
   want to have topic with Id = 8.0, then the topic with id=9.0, then id=7.0 and
   so on the topic with id=2.0 should be the last one as there is no reply to it
   after Sep 25.
 * URL to my forum (access to non-logged in users should be enabled).
    [http://dragolcho.com/football-forecasts/forum/?vasthtmlaction=viewforum&f=2.0](http://dragolcho.com/football-forecasts/forum/?vasthtmlaction=viewforum&f=2.0)
 * Thanks!!!
 * [https://wordpress.org/plugins/forum-server/](https://wordpress.org/plugins/forum-server/)

Viewing 1 replies (of 1 total)

 *  Thread Starter [dragolcho](https://wordpress.org/support/users/dragolcho/)
 * (@dragolcho)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/issue-with-sorting/#post-6591197)
 * The sorting turned out to be OK (the topics are sorted by ‘last_post’. The problem
   was that last_post was not updated correctly when a new post in a topic is done.
 * The error is in file wpf-insert.php, line 78.
    BEFORE: $wpdb->query(“UPDATE $
   vasthtml->t_threads SET last_post = ‘$date’ WHERE id = “.(int)$thread); AFTER
   $wpdb->query(“UPDATE $vasthtml->t_threads SET last_post = NOW() WHERE id = “.(
   int)$thread); Somehow there was not $date value. I have not dug deeper into the
   problem.
 * I am using version 1.8.2 of WP Forum Server.

Viewing 1 replies (of 1 total)

The topic ‘Issue with sorting’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/forum-server.svg)
 * [WP Forum Server](https://wordpress.org/plugins/forum-server/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/forum-server/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/forum-server/)
 * [Active Topics](https://wordpress.org/support/plugin/forum-server/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/forum-server/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/forum-server/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [dragolcho](https://wordpress.org/support/users/dragolcho/)
 * Last activity: [10 years, 8 months ago](https://wordpress.org/support/topic/issue-with-sorting/#post-6591197)
 * Status: not resolved