WordPress.org

Ready to get started?Download WordPress

Forums

Redirect after post made (10 posts)

  1. Joseph
    Member
    Posted 5 years ago #

    Hello

    What can I do to get redirected to a new post page after I have published my actual post? Right now I am getting redirected to the past edit page, I don`t like that.

  2. MichaelH
    Member
    Posted 5 years ago #

    That was done on purpose and I haven't seen a plugin to change that...

    See:
    http://wordpress.org/support/topic/214938?replies=13#post-892061
    http://wordpress.org/tags/add-post-redirect

    If you do find a solution, please report that back here. Thanks.

  3. Joseph
    Member
    Posted 5 years ago #

    Do you know where in the code I can fix this? That would help me a lot.
    Thanks.

  4. Joseph
    Member
    Posted 5 years ago #

    If someone needs this fix here it is.
    `

  5. MichaelH
    Member
    Posted 5 years ago #

    I'm guessing that it probably is in wp-adming/post.php in the redirect_post logic.

  6. MichaelH
    Member
    Posted 5 years ago #

    Very cool. Thanks.

  7. MichaelH
    Member
    Posted 5 years ago #

    Just a reminder that fix of changing line 52 of wp-admin/post.php

    from
    $location = add_query_arg( 'message', 6, get_edit_post_link( $post_ID, 'url' ) );
    to

    $location = "post-new.php";

    will need to be made each time you update WordPress.

  8. aaurel1an
    Member
    Posted 5 years ago #

    In 2.8 you do this on line 46.

  9. hungzai
    Member
    Posted 4 years ago #

    Thanks! This is what I need!

  10. aaurel1an
    Member
    Posted 4 years ago #

    On WP 2.9 you have to replace this on line 57:

    THIS:

    $location = add_query_arg( 'message', $message, get_edit_post_link( $post_ID, 'url' ) );

    WITH THIS:
    $location = "post-new.php";

Topic Closed

This topic has been closed to new replies.

About this Topic