Skip to main content
Snippet tested
Source Link

You should take a look at the redirect_post_location filter

Here is a (not tested) snippet:

add_filter( 'redirect_post_location', 'yourcustom_redirect_post_location' );
function yourcustom_redirect_post_location( $location, $post_id ) {

    if ( isset( $_POST['save'] ) || isset( $_POST['publish'] ) ){
        return get_permalink( $post_id );
    }

    return $location;
}

You should take a look at the redirect_post_location filter

Here is a (not tested) snippet:

add_filter( 'redirect_post_location', 'yourcustom_redirect_post_location' );
function yourcustom_redirect_post_location( $location, $post_id ) {

    if ( isset( $_POST['save'] ) || isset( $_POST['publish'] ) ){
        return get_permalink( $post_id );
    }

    return $location;
}

You should take a look at the redirect_post_location filter

Here is a snippet:

add_filter( 'redirect_post_location', 'yourcustom_redirect_post_location' );
function yourcustom_redirect_post_location( $location, $post_id ) {

    if ( isset( $_POST['save'] ) || isset( $_POST['publish'] ) ){
        return get_permalink( $post_id );
    }

    return $location;
}
Source Link

You should take a look at the redirect_post_location filter

Here is a (not tested) snippet:

add_filter( 'redirect_post_location', 'yourcustom_redirect_post_location' );
function yourcustom_redirect_post_location( $location, $post_id ) {

    if ( isset( $_POST['save'] ) || isset( $_POST['publish'] ) ){
        return get_permalink( $post_id );
    }

    return $location;
}