Frontend form with multiple posts
What was happening was, the global variable $post wasn’t ending up on the POST page – so in the conditional below where the form was being processes, if ( ‘POST’ == $_SERVER[‘REQUEST_METHOD’] && ! empty($_POST[‘post_id’]) && ! empty($_POST[‘post_title’]) && isset($_POST[‘postcontent’]) ) { header(‘Location: /’); $post_id = $post->ID; $post = array( ‘ID’ => esc_sql($post_id), ‘post_content’ => … Read more