I 'm using wordpress 3.0.5 I have to use sql for create post, here is my SQL query:
$req = $bdd->prepare('INSERT INTO wp_posts (post_title,post_content,post_name,post_date,post_date_gmt,post_modified,post_modified_gmt,post_author,post_status,post_type) VALUES (:post_title, :content, :post_name, now(), now(), now(), now(), 1 ,\'publish\', :post_type)');
Everything is fine, my post is created as I want, BUT when I edit my post in admin, for exemple adding a new term, post_status is no more "Publish", but "Scheduled" an my only solution is to
('UPDATE wp_posts SET post_status = \'publish\' WHERE id = :id_post')
When I creat a post directly in admin, everything is fine even if I edit my post.
I think I missed up the scheduled time !
Can you help me ? Thank you for your interest.