Trying to change active theme on all sites in Multisite

Use switch_theme( ‘theme_name’ ) to switch a theme Use wp_get_sites( array(‘network_id’ => $wpdb->siteid) ) to retrieve all sites info including the blog_id Loop through the retrieved blog ids and execute code within the scope of each blog using the switch_to_blog() function: foreach( $blog_ids as $blog_id ){ switch_to_blog( $blog_id ); //Do stuff restore_current_blog(); }

All Network sites display as main blog

After diving deep into wordpress core files I found out that somewhere along the lines of getting the blog details was a caching function. It was this line in the ms-blogs.php file. $details = wp_cache_get( $blog_id . $all, ‘blog-details’ ); It turns out that I had a cached version of the blog details which messed … Read more

How to pull data from child installation to parent theme

You want to enable WPMU and make custom functions to get/post data from one blog to another (using switch_to_blog). WPMU installs different tables for each blog you create on one WP installation. If you want to have the same design, child theme can be enabled on one WP installation. You cannot switch between child and … Read more