Fran Sanchez
asked 8 years ago


I just realised after the customer submits a question it just go back to the questions archive, no other info displayed, so they think it didnt go through and try again.

How can I redirect to a thank you page?

Also, it is impossible to log in your site, I had to create a new account. It keeps redirecting to CMS Pioneer and even when I make the new password I still cant log into your website.

1 Answers
answered 8 years ago

To redirect users to a different page or list questions when user submit a answer, please open the wp-content/plugins/dw-question-answer/inc/Posts/Answer.php file. Find the line 408.
Replace the following code:

// wp_redirect( get_permalink( $question_id ) );
// wp_send_json_success( array( 'url' => get_permalink( $question_id ) ) );
// return true;

With new code:

wp_send_json_success( array( 'url' => get_permalink( $question_id ) ) );
return true;

To redirect users to a different page when user submit a question, please open the Question.php file in the folder path wp-content -> plugins -> dw-question-answer -> inc -> Post -> Question.php file. Find the line code around line 439:
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/' ) );

About the permalink of categories, have you tried to add the permalink in the Settings of Q&A

Powered by DW Question & Answer Pro