add post meta front end edit
This code should be conditional first and then form output since you can’t use wp_redirect after headers are set and you are updating so use update_post_meta instead of add_post_meta. Try: if( ‘POST’ == $_SERVER[‘REQUEST_METHOD’] && !empty( $_POST[‘action’] ) && $_POST[‘action’] == “edit_post” && isset($_POST[‘pid’])) { $the_post = get_post($_POST[‘pid’]); $the_post = array(); $the_post[‘post_content’] = $_POST[‘description’]; $the_post[‘data’] … Read more