Redirect after post a question
Hi Guys. I was working with a bit complex site an I wasn’t allowed to disable another plugins. So I solved using this javascript code:
window.onload=function() {
document.getElementById(“ask_form”).onsubmit =function() {
window.location.replace(“yoururl.com”);
return false;
}
}
So now I’m redirecting to the anspress index after submit a new question. It works well by now. What do u thing about this solution?
Rahul Aryan commented on answer
This is not AnsPress issue. Some other plugin is breaking response by outputting dump. It will be better to find the cause of issue rather this using above javascript code. As it will not check if there is any error on form submission. Most easiest way would be download wp-contest folder and search for `var_dump` and `print_r` using a text search software.