所以我想出来了:我在wp config中添加了默认主题:
// Setting default theme for newly created sites
define( \'WP_DEFAULT_THEME\', \'theme-child\' );
对于我添加的静态首页:
# ON SIGNUP OF NEW SITES A NEW PAGE IS CREATED CALLED "Homepage" AND SET AS
THE STATIC FRONT PAGE
add_action( \'wpmu_new_blog\', \'process_extra_field_on_blog_signup\', 10, 6 );
function process_extra_field_on_blog_signup( $blog_id, $user_id, $domain,
$path, $site_id, $meta ) {
switch_to_blog($blog_id);
$new_page_title = \'Homepage\'; //page title
$new_page_content = \'TEST\'; //content of page goes here
$new_page_template = \'\'; //page template.
$page_check = get_page_by_title($new_page_title);
$new_page = array(
\'post_type\' => \'page\',
\'post_title\' => $new_page_title,
\'post_content\' => $new_page_content,
\'post_status\' => \'publish\',
\'post_author\' => 1,
);
if(!isset($page_check->ID)){
$new_page_id = wp_insert_post($new_page);
if(!empty($new_page_template)){
update_post_meta($new_page_id, \'_wp_page_template\', $new_page_template);
}
}
$homepage = get_page_by_title( \'Homepage\' );
if ( $homepage )
{
update_blog_option( $blog_id, \'page_on_front\', $homepage->ID );
update_blog_option( $blog_id, \'show_on_front\', \'page\' );
}
restore_current_blog();
}
现在,我只需要在新创建的站点上设置所有用户的管理员。