Hard Code Pages into a Theme for a Network (multisite) Installation
Hook into wpmu_new_blog and create your pages: add_action(‘wpmu_new_blog’, ‘create_my_pages’, 10, 2); function create_my_pages($blog_id, $user_id){ switch_to_blog($blog_id); // not really need, new blogs shouldn’t have any content if(get_page_by_title(‘About this Network’)) return; // create each page $page_id = wp_insert_post(array( ‘post_title’ => ‘About this Network’, ‘post_name’ => ‘about-this-network’, ‘post_content’ => ‘Co za asy…’, ‘post_status’ => ‘publish’, ‘post_author’ => $user_id, … Read more