I’d like for a user to ask a question and as soon as they submit, they’d be redirected to a different custom page. Is there any way to do that?
Dear chiara Mazzucco,
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 -> actions.php".
Find the line code around line 511:
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 :
exit( wp_safe_redirect( home_url() .'discussion-forum/' ) );
Hope this helps !
Please login or Register to submit your answer