Hello.
Im using this to create new post:
$my_post = array();
$my_post['post_title'] = 'Ankieta wypełniona przez: ' . $a11;
$my_post['post_content'] = $info;
$my_post['post_status'] = 'publish';
$my_post['post_author'] = 1;
$my_post['post_category'] = array(1);
wp_insert_post( $my_post );
how can i get the id of that new post? i need this id to be saved in a separate sql table.
this is for people who are filling my form with some questions. i need to send them link to their posts via email.
thx :)