• Resolved rick2rick

    (@rick2rick)


    Hello,

    How to redirect to my custom edit page?

    On frontpage I have function
    duplicate_post_clone_post_link( "New", $before, $after, $post->ID ) which generates url like this /wp-admin/admin.phpaction=duplicate_post_new_draft&post=xxxx…

    After user interaction he get constantly moved to /wp-admin/post.php?action=edit&post=xxxx leaving frontpage edit form.

    I have tried to include wp_redirect() to dp_duplicate_post action, but something wrong with this solution, as redirecting is to empty new draft. Without redirect draft is not empty.

    wp_redirect ("/customeditpage/?postid=".$new_post_id."&action=edit"); exit;

    • This topic was modified 4 years, 6 months ago by rick2rick.
    • This topic was modified 4 years, 6 months ago by rick2rick.
    • This topic was modified 4 years, 6 months ago by rick2rick.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘Frontend redirect’ is closed to new replies.