post_status => publish not working
I have a front end form that let users submit a post. This is how i store the data when a post is submitted : if ( isset( $_POST[‘submitted’] )) { $post_information = array( ‘post_title’ => wp_strip_all_tags( $_POST[‘postTitle’] ), ‘post_content’ => $_POST[‘postContent’], ‘post_type’ => ‘post’, ‘post_status’ => ‘publish’ ); $new_post = wp_insert_post( $post_information ); The … Read more