Support » Plugin: WP User Frontend - Membership, Profile, Registration & Post Submission Plugin for WordPress » Submit a new post doesn't direct to the added post!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Solved…

    Can you tell me how you solved it because i couldn’t

    ok i have done it too but i will not leave others blank or questioning so here is the code i used to achieve this task
    add this code to yours theme’s functions.php file

    add_filter('wpuf_after_post_redirect', 'some_callback');
    function some_callback(){
    wp_redirect(get_permalink($page_id)."?post=successful");
    }

    Put your post id in it to where you you want it to redirect when post is submitted successfully

    Actually I didn’t post the solution because what I did was modifying a plugin file which is not recommended since you will be forced to redo this modification on each update! But I did it, I needed a quick solution.

    What I did is a little modification on the wpuf-add-post.php file, in the end of the submit_post() function:
    instead of wp_redirect( $redirect );
    just put
    wp_redirect( get_permalink( $post_id ) );

    Regards
    Hope

    Hi @usmanarfani, I found this did just the trick but require something similar for the Edit page, i.e. to redirect to the newly edited post (and include the success message). Any help greatly appreciated. Thanks
    R

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Submit a new post doesn't direct to the added post!’ is closed to new replies.