Title: Post with wp_insert_post
Last modified: May 12, 2017

---

# Post with wp_insert_post

 *  [zzakari](https://wordpress.org/support/users/zzakari/)
 * (@zzakari)
 * [9 years ago](https://wordpress.org/support/topic/post-with-wp_insert_post/)
 * hi,
 * using the following to make a post
 *     ```
       $my_post = array(
           'post_title' => $post_title,
           'post_content' => $post_content,
           'post_status' => 'publish',
           'post_author' => '1',
           'post_category' => $cats
           //'post_date'     => $postdate
       );
   
       if (wp_insert_post( $my_post ))
       ```
   
 * but always the new posts appear below the previous ones ;(
 * I have to pass something else @ array ?

The topic ‘Post with wp_insert_post’ is closed to new replies.

 * ![](https://ps.w.org/simple-custom-post-order/assets/icon-256x256.jpg?rev=2969435)
 * [Simple Custom Post Order](https://wordpress.org/plugins/simple-custom-post-order/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/simple-custom-post-order/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/simple-custom-post-order/)
 * [Active Topics](https://wordpress.org/support/plugin/simple-custom-post-order/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/simple-custom-post-order/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/simple-custom-post-order/reviews/)

## Tags

 * [wp_insert_post](https://wordpress.org/support/topic-tag/wp_insert_post/)

 * 0 replies
 * 1 participant
 * Last reply from: [zzakari](https://wordpress.org/support/users/zzakari/)
 * Last activity: [9 years ago](https://wordpress.org/support/topic/post-with-wp_insert_post/)
 * Status: not resolved