0
我需要为所有页面(没有子页面)创建子页面。它应该是一次性脚本/功能。我试图做那样的行为如何在wordpress中为父页面创建子页面
$my_post = array(
'post_title' => 'My post',
'post_content' => 'This is my post.',
'post_status' => 'publish',
'post_author' => 1,
'post_category' => array(8,39)
);
wp_insert_post($my_post);
但是不知道要做别的。