Title: Making posts far into the future using wp_insert_post causing errors
Last modified: August 20, 2016

---

# Making posts far into the future using wp_insert_post causing errors

 *  [Rambomst](https://wordpress.org/support/users/rambomst/)
 * (@rambomst)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/making-posts-far-into-the-future-using-wp_insert_post-causing-errors/)
 * I am having issues using wp_insert_post when posting far into the future. If 
   I make a post for the next couple of days it works fine however if I make it 
   to be posted in a month or two it will be posted straight away and isn’t being
   displayed in the admin area under ‘Posts’
 * The code I am using is:
    ` //This is what the value of $imageDate looks like.
   $imageDate = '2012-10-30'; if($imageDate != false) { $imagePost = array( 'post_title'
   => $imageTitle, 'post_content' => 'Content added later.', 'post_status' => 'future','
   post_date' => $imageDate . " 00:00:00", 'post_author' => 1, 'tags_input' => "'".
   $imageTags."'", 'post_category' => array(1) ); } else { $imagePost = array( '
   post_title' => $imageTitle, 'post_content' => 'Content added later.', 'post_status'
   => 'publish', 'post_author' => 1, 'tags_input' => "'".$imageTags."'", 'post_category'
   => array(1) ); }
 * $postID = wp_insert_post($imagePost);

Viewing 1 replies (of 1 total)

 *  Thread Starter [Rambomst](https://wordpress.org/support/users/rambomst/)
 * (@rambomst)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/making-posts-far-into-the-future-using-wp_insert_post-causing-errors/#post-3048308)
 * Still haven’t found a solution for this. Any help is much appreciated.

Viewing 1 replies (of 1 total)

The topic ‘Making posts far into the future using wp_insert_post causing errors’
is closed to new replies.

## Tags

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

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 1 reply
 * 1 participant
 * Last reply from: [Rambomst](https://wordpress.org/support/users/rambomst/)
 * Last activity: [13 years, 8 months ago](https://wordpress.org/support/topic/making-posts-far-into-the-future-using-wp_insert_post-causing-errors/#post-3048308)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
