how to add datas in taxonomy to post with wp_insert_post this is my code but it is saved in my texonomy draft,why? i have given post_type=publish.
$my_post = array(
'post_title' => 'test',
'post_content' => 'hello',
'post_status' => 'publish',
'post_author' => $userdata->ID,
'post_type' => 'Newpostlist',
);
$post_id = wp_insert_post($my_post);