How to redirect to custom URL after submitting a question?

3.69K viewsGeneral

Hi Rauhl,
I’m running a moderated setup of Anspress an would like to redirect the user to a custom URL (i.e: after question submission but can’t find anything here…Is there a way to achieve this?

Answered question

Hi Andre,
You can use action ap_after_question_form_processed.

add_action( 'ap_after_question_form_processed', function () {
            'success'  => true,
            'redirect' => get_permalink( $post_id ), // CHANGE THIS TO CUSTOM LINK

Edited answer
You are viewing 1 out of 1 answers, click here to view all answers.