posts - wp_insert_post() Add and specific ID to the body of that

Is there a way to add an specific ID to the body of that post that it's created by that method?The thing is, I'

Is there a way to add an specific ID to the body of that post that it's created by that method?

The thing is, I'm creating a new post using this

 $new_page = array(
                'post_type' => 'page',
                'post_title' => $new_page_title,
                'post_content' => $new_page_content,
                'post_status' => 'publish',
                'post_author' => 1,
                'import_id' => 999999,
            );
wp_insert_post($new_page);

I do that to give special styles only in that page that it's generated when the plugin is activated. As i gave the id 999999 the counter when I create a posts starts from there, 100000,100001 and so on... which i thing it's not good, so, is there a way to give the body an ID and not only adding it in the class?

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744750850a4591584.html

相关推荐

  • posts - wp_insert_post() Add and specific ID to the body of that

    Is there a way to add an specific ID to the body of that post that it's created by that method?The thing is, I'

    11小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信