当我插入新文章时,如何选择要使用的文章ID,例如:
$post = array(
'ID' => 3333,
'comment_status' => 'open',
'post_content' => 'hi world!',
'post_name' => 'title_1',
'post_status' => 'publish',
'post_title' => 'sdfsfd fdsfds ds',
'post_type' => 'post',
);
$post_id = wp_insert_post($post);
想要插入ID为3333的新文章
id
是数据库中的自增主键字段。我不认为你能做到这一点。你为什么要这样做呢? - Dogbertimport_id
,正如@daveaspinall下面建议的那样。 - Astrotim