小编Lui*_*igi的帖子

WordPress:使用 wp_insert_post() 在帖子中插入帖子格式

因为我可以使用 wp_insert_post () 使用帖子格式插入我的 php 帖子(例如:post -format- quote )。

\n\n
$my_post = array(\n    \'post_type\'     => \'post\', // "post" para una entrada, "page" para p\xc3\xa1ginas, "libro" para el custom post type libro...\n    \'post_status\'   => \'publish\', // "draft" para borrador, "future" para programarlo...\n    \'post_title\'    => $_POST[\'BlogEntranceTitle\'], \n    \'post_content\'  => $_POST[\'BlogEntranceCode\'], \n    \'post_author\'   => $user_ID, //  \n    \'post_category\' => $_POST[\'BlogEntranceCats\'],  \n    \'tags_input\'    => $_POST[\'BlogEntranceTags\'],\n    \'post_excerpt\'  => $_POST[\'BlogEntranceExcerpt\']\n);\nwp_insert_post( $my_post );\n
Run Code Online (Sandbox Code Playgroud)\n\n

成就插入这些选项,但我没有收到添加格式帖子

\n

wordpress insert

2
推荐指数
1
解决办法
3808
查看次数

标签 统计

insert ×1

wordpress ×1