Check if Post Title exists, Insert post if doesn’t, Add Incremental # to Meta if does
I already have a function where a user submits a form and creates a custom post… <?php $postTitle = $_POST[‘post_title’]; $submit = $_POST[‘submit’]; if(isset($submit)){ global $user_ID; $new_post = array( ‘post_title’ => $postTitle, ‘post_content’ => ”, ‘post_status’ => ‘publish’, ‘post_date’ => date(‘Y-m-d H:i:s’), ‘post_author’ => ”, ‘post_type’ => ‘stuff’, ‘post_category’ => array(0) ); $post_id = wp_insert_post($new_post); … Read more