2
votes

I am trying to add a new Scheduled post to my wordpress blog remotely. But, when i try to set "post_status" to "future", it fails to do so and set the "Post_Status" to "Draft".
I am using "metaWeblog.newPost" method for creating new post.
Anyone knows whats wrong with Scheduled posts?
Is there any chance that "metaWeblog.newPost" does not support "Post_Status" to be "future"?

1

1 Answers

2
votes

when you change the post status into future you have to provide future date as well. Example:

global $post;
$my_post = array();
$my_post['ID'] = $ID;
$my_post['post_status'] =  'future';
$my_post['post_date'] =  '2012-12-25 09-20-58'; 
wp_update_post( $my_post );