Steve Rennie
asked 7 years ago

I want to put the ability to Ask a question on the same page I’ll post the questions that have been asked. When a user submits a question they get taken to a page that displays that question only. I want the user to stay on the same page once they’ve submitted question and see it updated in the list of Previously asked questions. How can I control where the user goes after posting a question?

1 Answers
DominicStaff
answered 7 years ago

In this case, you can refer the following answer:
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 -> inc -> Handle.php”.
Find the line code around line 446:
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