AI Search
Classic Search
 Search Phrase:
 Search Type:
Advanced search options
 Search in Forums:
 Search in date period:

 Sort Search Results by:

AI Assistant
Notifications
Clear all

[Solved] Reply Redirect

7 Posts
2 Users
1 Reactions
1,451 Views
Posts: 5
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@bananatutu_22)
Active Member
Joined: 2 years ago
[#57730]

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: 5774
 Sofy
Admin
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@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
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@bananatutu_22)
Active Member
Joined: 2 years 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: 5774
 Sofy
Admin
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@sofy)
Support Team
Joined: 8 years ago

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


Posts: 5
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@bananatutu_22)
Active Member
Joined: 2 years ago

That's great. Thanks @sofy 


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

Support Team
Posts: 5774
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

@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
Share: