i've spent way too much time trying to use the
wp_insert_post() function a
<form> and i do not know why it is not working.
// Create post object $my_post = array( 'post_title' => 'My post', 'post_content' => 'This is my post.', 'post_status' => 'publish', 'post_author' => 1, 'post_category' => array(8,39) ); // Insert the post into the database wp_insert_post( $my_post );
I'm probably doing something wrong.
If possible can you please hook this to a form. Thanks verymuch. I just need an example to see what i am doing wrong.
here is a link to where i previously asked. pls don't mark dupe.