我正在尝试使用以下代码插入帖子:
$my_post = array(
'post_type' => "essays",
'post_title' => 'TEST 3',
//'post_content' => $content,
'post_status' => 'draft',
'post_author' => 1,
//'post_category' => $cat,
'tags_input' => 'TQM,tag',
);
$post_id = wp_insert_post($my_post);
一切正常,除了标签,它不插入任何标签。任何想法?