Notifications
Clear all

Script [Solved] Latest/ most recent replies first.

9 Posts
3 Users
0 Reactions
1,505 Views
NSH
Posts: 97
 NSH
Topic starter
(@studio500)
Estimable Member
Joined: 7 years ago

Hello team

I'm looking to arrange my forum replies from newest to oldest.

The problem is, I have a lot of content, some of which was posted over 12-15 years ago, so when a new user reads my forum comments (along with some cross-posted comments) they believe the post is old and don't reply.

I'm aware that this question has been asked in the past, and at that time a piece of code was provided for wpForo V1.

My question is, has this option been incorporated into V2? If not, will the code provided for wpForo V1, still work on V2?

 

8 Replies
NSH
Posts: 97
 NSH
Topic starter
(@studio500)
Estimable Member
Joined: 7 years ago

Any update please?

2 Replies
Chris
(@chris)
Joined: 3 years ago

Famed Member
Posts: 3647

Hi @studio500

This is the new way to show replies/posts in reversed order. So the new replies will be on the top, right after the first post of the topic. You should put this code to the current active WordPress theme functions.php file:

add_filter('wpforo_post_list_args', function ($args){
if(!empty($args)){
$args['orderby'] = '`is_first_post` DESC, `created` DESC, `postid` DESC';
}
return $args;
});
NSH
 NSH
(@studio500)
Joined: 7 years ago

Estimable Member
Posts: 97

@chris Thanks Chris. Very much appreciated.

NSH
Posts: 97
 NSH
Topic starter
(@studio500)
Estimable Member
Joined: 7 years ago

A response would be appreciated.

 

4 Replies
Chris
(@chris)
Joined: 3 years ago

Famed Member
Posts: 3647

@studio500,

Sorry for the late Response, some questions take more time to answer.

NSH
 NSH
(@studio500)
Joined: 7 years ago

Estimable Member
Posts: 97

@chris Thanks for the acknowledgement Chris. I'll stand by.

(@cotner)
Joined: 2 years ago

Estimable Member
Posts: 126
NSH
 NSH
(@studio500)
Joined: 7 years ago

Estimable Member
Posts: 97

@cotner Thanks for pointing that out Chris, weirdly there was no reply when I checked. I've just checked the timestamps, and I was expecting the replies to follow on from each other.

At least it's been sorted.

Thanks for the response Team.