asked 3 years ago

Hi Dominic,
I really like Q&A Pro. It has been very helpful on the WordPress websites I have it on. There is only one issue I cant seem to solve now that Im using it for a new website.
When a user is on website.com/streaming, if they ask a question, they get redirected to the page with the question. But on some websites, we dont want that. We want the user on website.com/streaming, to ask the question and NOT be redirected to the question page. Is this possible?
Thank you and have a very nice day.

1 Answers
answered 3 years ago

To redirect users to a different page when user submit a question, please open the actions.php file in the folder path wp-content -> plugins -> dw-question-answer-pro -> inc -> Handle.php.
Find the line code around line 546:
exit( wp_safe_redirect( get_permalink( $new_question ) ) );
Then replace with the following code to redirect to home page:
exit( wp_safe_redirect( home_url() ) );
Notice: you can use similar to redirect user to any other page as you wish (in your case to the question listing page)
Eg: like this is my url : http://mysite/discussion-forum/
exit( wp_safe_redirect( home_url() .'discussion-forum/' ) );

Powered by DW Question & Answer Pro