Notifications
Clear all

wpForo 1.x.x [Solved] Sort topics by its created time, not the last reply's created time

5 Posts
3 Users
2 Reactions
1,302 Views
Posts: 19
Topic starter
(@zmgma)
Eminent Member
Joined: 5 years ago

Hello

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.

Best regards,

Dan

4 Replies
Sofy
Posts: 4900
 Sofy
Admin
(@sofy)
Support Team
Joined: 7 years ago

Hi @zmgma,

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. 

Posts: 19
Topic starter
(@zmgma)
Eminent Member
Joined: 5 years ago

Hi @sofy

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.

REF: https://imgur.com/8TPINPz

Could you let me know which file I have to edit and clues?

Many thanks:)

Robert
Posts: 10591
Admin
(@robert)
Support Team
Joined: 9 years ago

Hi @zmgma,

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/

Posts: 19
Topic starter
(@zmgma)
Eminent Member
Joined: 5 years ago

AWESOME @robert

Thank you so much for your great supports!!!

I really appreciate it! You made my day thank you and have a nice day:)