I used the following code to change the sort oder of replies. So new postings at the top.
But now the links of recent posts are not working correct anymore, so they donest redirect to the correct post anymore. But this only happens to "direct replies"
This is my code
add_filter('wpforo_post_list_args', function ($args){
if(!empty($args)){
$args['orderby'] = '`is_first_post` DESC, `created` DESC, `postid` DESC';
}
return $args;
});
Any idea why this also have an impact to these links?
Hi @seofoxx-de,
The code you wrote won't do what you're looking for. There is no way to do that.
Im confused - this code was presented from you? https://wpforo.com/community/postid/15418/ and it works, so it does change the sort order.
ok maybe i misunderstood your answer, so this code change the sort order ok - but you say its not possible to get the "recent posts" links (right sidebar) to work ?
Ok yes, and i dont want to change the sort order at the sidebar, thats not what i meant. I just talk about the issue when implementing this code - these "last replies" donest work anymore - so they dont redirect to the posting - they just open the thread at the very first post.