wpForo 1.x.x [Solved] Sort topics by its created time, not the last reply's created time
I have a question regarding topic's order.
Is it possible to sort topics by its created time, not the last reply's created time?
I don't want to refresh the topics' order when the reply is created.
Could you let me know the file that I have to edit and some clues?
Thank you for your efforts always.
I'm sorry, but wpForo doesn't have such a feature.
Please let us know the wpForo layout you're using, we'll try to find some solution for you.
Thank you for your reply. I'm using threaded layout, and as I explained, I would not like to sort by replies created time.
I hope all topics are sorted by its created time, not last reply's created time.
Could you let me know which file I have to edit and clues?
Please do these steps to make the change in update-safe way.
1. Create a /wpforo/ folder in your current active theme folder. If you have a child theme create it in the child theme folder.
2. Create /layouts/ folder in the /wpforo/ folder, then create /4/ folder in the /layout/ folder. So the end directory should look like this: /wp-content/themes/your-active-theme/wpforo/layouts/4/
3. Copy /wp-content/plugins/wpforo/wpf-themes/classic/layouts/4/forum.php file and paste in the new created directory: /wp-content/themes/your-active-theme/wpforo/layouts/4/
4. Edit the copied file and find this line:
$args = array( 'row_count' => WPF()->forum->options['layout_threaded_intro_topics_count'], 'forumids' => $child_forums, 'orderby' => 'type, modified', 'order' => 'DESC' );
5. Change it to this and save:
$args = array( 'row_count' => WPF()->forum->options['layout_threaded_intro_topics_count'], 'forumids' => $child_forums, 'orderby' => 'type, created', 'order' => 'DESC' );
More information about update-safe way customization of wpForo template files you can find here: https://wpforo.com/docs/root/forum-themes/theme-customization/
Thank you so much for your great supports!!!
I really appreciate it! You made my day thank you and have a nice day:)