Notifications
Clear all

Reply Redirect

4 Posts
2 Users
0 Reactions
59 Views
Posts: 2
Topic starter
(@bananatutu_22)
New Member
Joined: 3 days 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.

3 Replies
Sofy
Posts: 4705
 Sofy
Admin
(@sofy)
Support Team
Joined: 7 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

Reply
Posts: 2
Topic starter
(@bananatutu_22)
New Member
Joined: 3 days 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.

Reply
Sofy
Posts: 4705
 Sofy
Admin
(@sofy)
Support Team
Joined: 7 years ago

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

Reply