我正在尝试创建标题为1
, 2
等
$published_posts = wp_count_posts(\'orders\')->publish;
$count = $published_posts + $a;
$success = get_page_link(794);
if(wp_mail($admin_email, \'Заказ с сайта: \'.get_bloginfo(\'name\'), $message)) {
$my_post = array(
\'post_title\' => $count,
\'post_type\' => \'orders\',
\'post_content\' => $message,
\'post_status\' => \'publish\',
\'post_author\' => 1,
);
$post_id = wp_insert_post( $my_post );
但帖子的标题是
1-2
,
1-3
等
如何计算帖子并添加帖子加1?例如,如果帖子是10
, 新职位的名称为11