redirect on save_post action (4 posts)

  1. japanitrat
    Posted 9 years ago #


    i need to check available meta-tags when somebody saves a post and if true redirecting him to another admin_menu page. so i set an action hook on "save_post", evaluating the metadata through get_post_meta and calling wp_redirect() in the end. but nothing happens, except the update-info on top of the edit-page.

    how to solve this?

  2. golddave
    Posted 9 years ago #

    Did you ever get an answer to this question?

  3. japanitrat
    Posted 9 years ago #

    no i didnt :(

  4. Simon Wheatley
    Code for the People
    Posted 8 years ago #

    Hi. wp_redirect uses HTTP headers to perform the redirection. This redirection technique will not work if any output (even whitespace) has already been sent, therefore check this isn't the case. If it is, you will need to find another redirect method, or call wp_redirect on a hook which actions before content is sent.

Topic Closed

This topic has been closed to new replies.

About this Topic