呼叫时wp_insert_post()
see api 似乎不可能设置新条目的post slug/post permalink。
e、 g.是否有办法检查:
如果不可用,字符串可以用作后段塞,返回错误。
post_name
是鼻涕虫。
\'post_name\' => [ <string> ] // The name (slug) for your post
在插入新帖子之前,您需要查询具有匹配slug的帖子,如果有重复的帖子,WordPress只会添加一个数字以使其唯一。我需要把帖子传过去wp-json 拥有"standard" 作为其格式。我一直在尝试不同的方法,比如WP_Query 像这样。function get_blog_posts() { $posts = new WP_Query( array( \'post_type\' => \'post\', \'posts_per_page\' => 4, \'tax_query\' => ar