如果你制作了一个主题,需要新建很多页面才能够完美工作,那么在使用者激活主题的时候自动新建页面将会给主题的使用省略很多设置步骤。 创建文章使用的函数为wp_insert_post();使用方法如下 [ ] //Are you updating an existing post? 'menu_order' => [ ] //If new post is a page, it sets the order in which it should appear in the tabs. 'comment_status' => [ 'closed' | 'open' ]