Notifications
Clear all

Limited Support

Our team is currently on holiday, so support will be limited during this period. Response times may be slower than usual, and some inquiries may be delayed.
We appreciate your patience and understanding, and we’ll resume our usual support by the end of August.

 

[Solved] Reply Redirect

7 Posts
2 Users
1 Reactions
800 Views
Posts: 5
Topic starter
(@bananatutu_22)
Active Member
Joined: 10 months ago

Hi there,

I've added the code to my functions file so that the latest reply will display on page one, however when a new reply is submitted the user will be redirected to the last page when I require the user to be redirected to the first page where the new reply displays.

Is there a solution for this after adding the code to reverse the post/reply order.

This is the code that I have added to my functions file based on other support topics for reversing the post/reply order.

add_filter('wpforo_post_list_args', function ($args){
    if(!empty($args)){
       $args['orderby'] = '`is_first_post` DESC, `created` DESC, `postid` DESC';
    }
    return $args;
 });

Thanks in advance.

6 Replies
Sofy
Posts: 5483
 Sofy
Admin
(@sofy)
Support Team
Joined: 8 years ago

Hi,

We don't follow you well. If you're asking to redirect to the last reply when the page is opened, this isn't possible.

I also recommend purchasing pro support and reaching out to the pro support team for customizations: https://wpforo.com/pro-support/#plugin-support

Posts: 5
Topic starter
(@bananatutu_22)
Active Member
Joined: 10 months ago

Hi @sofy thanks for your reply.

After adding the code to reverse the order of replies so that the latest reply is on page 1 of the topic, the action, of where the user is directed to the last page after a reply, remains the same before adding the above mentioned code.

ie When someone posts, the post will show up on page 1 but the page refresh after posting redirects to page 9 (example for last page). Any suggestions on how I should be trying to fix this so they go to the first page of the topic instead of the last page after submitting?

Thanks again.

Sofy
Posts: 5483
 Sofy
Admin
(@sofy)
Support Team
Joined: 8 years ago

I'll ask the developers and get back to you soon.Β 

Posts: 5
Topic starter
(@bananatutu_22)
Active Member
Joined: 10 months ago

That's great. Thanks @sofyΒ 

1 Reply
Sofy
 Sofy
Admin
(@sofy)
Joined: 8 years ago

Support Team
Posts: 5483

@bananatutu_22,

We're really sorry, but there is not an easy solution for this case. You should not use the code above.Β Β 

Page 1 / 2