how to list all subdomain in wordpress multiuser

take a look at this plugin : Multi-Site Site List Shortcode or if you prefer a snippet then: $blog_list = get_blog_list( 0, ‘all’ ); if (count($blog_list) > 1){ echo ‘<ul>’; foreach ($blog_list AS $blog) { echo ‘<li>Blog ‘.$blog[‘blog_id’].’: ‘.$blog[‘domain’].$blog[‘path’].'</li>’; } echo ‘</ul>’ }

Set a default page template to load for multi-site

I dont think there is anything like page_template=> but you can just specify the template like this: update_post_meta($id, “_wp_page_template”, “new_template.php”); http://codex.wordpress.org/Function_Reference/update_post_meta or using your code above: $wpdb->insert( $wpdb->postmeta, array( ‘post_id’ => 2, ‘meta_key’ => ‘_wp_page_template’, ‘meta_value’ => ‘new_template.php’ ) );