• abatham17

    (@abatham17)


    I’m trying to redirect my form to new post using below code and

    add_filter('cf7_2_post_form_append_output', 'redirect_on_submit', 10, 3);

    but its not working….

    If you wish to redirect to the newly saved post (assuming it is published, see FAQ #16),
    if(isset($_GET[‘cf72post’])){
    $post_id = get_transient($_GET[‘cf72post’]);
    //get the link to the new post,
    $url = get_permalink($post_id);
    if ( wp_redirect( $url, 200 ) ) {
    exit;
    }
    echo ‘unable to redirect, maybe the post wasn’t published’;
    }

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.