When creating posts via a ACFE Form in order to have unique titles i like to use the post id but this leave me with a bit of a cart before the horse situation how can i add the id when the Post hasn’t been created thankfully ACFE has a hook for that:
<?php add_action('acfe/form/submit/post/form=add-post', 'my_form_post_save', 10, 5); function my_form_post_save($post_id, $type, $args, $form, $action){ $updated_details = array( 'ID' => $post_id, 'post_title' => "Post #$post_id", 'post_author' => 0, ); wp_update_post( $updated_details ); } ?>