waqas mumtaz
asked 10 years ago

hello 
i want to set whenever a user post a question or reply to any question. after submision it should be redirect to all questions page. is it possible??
 
regards

2 Answers
Guru
answered 10 years ago

Dear Waqas,
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) !
Hope this helps !
Best regards,

waqas mumtaz
replied 10 years ago

Dear Guru

Thanks for the help. but how i can redirect to any other page instead of homepage. could u please give me an example how to use it

waqas mumtaz
replied 10 years ago

like this is my url : http://businera.com/discussion-forum/ (to redirect user to this page)

Guru
answered 10 years ago

You can use the same code above and simply modify, try and let me know.

exit( wp_safe_redirect( home_url() .'discussion-forum/' ) );
Powered by DW Question & Answer Pro