wp_insert_post is not creating revision in database
-
Hi,
I am creating custom frontend post submission form. I am usingwp_insert_post
for creating new post. The function is working fine but it is not creating the revision record in database.Following is my code. I want record of every revision made in the post. Plz Help… Thanks…
<?php if (isset($_POST['submit_post']) ) { $my_post = array( 'post_title' => wp_strip_all_tags( $_POST['post_title'] ) ); wp_insert_post( $my_post ); } ?> <form method="POST"> <div class="form-group"> <label for="post_title">Post Title</label> <input type="text" class="form-control" name="post_title" placeholder=""> </div> <button type="submit" name="submit_post" class="btn btn-default">Submit Post</button> </form>
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘wp_insert_post is not creating revision in database’ is closed to new replies.