WordPress.org

Support

Support » Plugins and Hacks » WP User Frontend » Redirect after editing post

Redirect after editing post

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi Wombat86,

    This is exactly the functionality I’m looking for. Have you managed to get this working and if so, can you explain me how?

    Thanks!

    Yes, I did get it to work after trying many different things.

    I added this around line 504 of wpuf-edit-post.php:

    do_action( ‘wpuf_edit_post_after_update’, $post_id );
    $permalink = get_permalink( $post_id );
    wp_redirect( $permalink );
    exit;

    I hope that works for you!

    Thanks! This works fine!

    Would be nice if there was a pluggable wpuf_after_edit_redirect or something, but for now my problem is solved! Thanks!

    its working … though “Post updated successfully” message not showing in updated page.

    Hi,
    To keep the “success message” after the update, first add a get parameter to your url like :

    $permalink = get_permalink( $post_id ).'?pid=' . $post_id . '&mes=success';

    and than, just move the code near the line 76, where you have :

    $post_tags = wp_get_post_tags( $curpost->ID );

    and add this line :

    if (isset( $_GET['mes'] ) && ($_GET['mes']) == "success" ){
        		echo '<div class="success">' . __( 'Post updated succesfully.', 'wpuf' ) . ' <a href="'. get_permalink( $curpost->ID ).'"> View my post...</a></div>';
        	}

    it works fine for me

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Redirect after editing post’ is closed to new replies.
Skip to toolbar