I wouldn’t recommend to use update_option for this task. Why? Because themes/plugins may use switch_theme action and it won’t get run in such case. And this action is pretty important – it will allow you to save your widgets for example…
Another problem with Fuxias answer is that she uses template_directory hook. But there is no point to run it every time. If you set the theme, it is set, so you have to do it only once.
Here’s the code that will loop through all subsites and set the theme to given one. Put it on your site, run once and then delete it (or comment it):
function switch_all_multisite_themes() {
foreach ( get_sites() as $site ) {
switch_to_blog( $site->blog_id );
switch_theme( 'twentyeleven' );
restore_current_blog();
}
}
switch_all_multisite_themes(); // run this function only once
Related Posts:
- Allow user to select a theme to install when they signup
- Is there an easy way to separate themes on network?
- Hide a theme on list of themes in wp-admin without editing core files
- Can I install a theme on only one site of a multi-site network install?
- Can’t find “Add New” button for themes in a multisite
- How to move theme directory but not plugins/uploads out of WordPress root directory?
- Manipulate list of themes in wp-admin
- Subfolder multisite issue. Themes and plugin files 404
- cant enable theme in multisite
- Bulk activate a theme on multisite
- Using Two Themes – One for Main Site, One for Ecommerce
- Multi-site get_bloginfo(‘stylesheet_directory’) referring to sub-folder
- Multisite theme control not working
- WordPress MultiSite Theme
- Update configured themes
- How to show different sub sites based on Member’s user name In word press?
- Does a single theme license work on multisite? [closed]
- Create a CSS file in plugin folder when theme is activated
- Is it necessary to network enable both the parent and child theme for multisite installations?
- Trying to change active theme on all sites in Multisite
- Multisite > Edit Site > Themes – what are these themes?
- WordPress multisite with same content
- How to automate setup of theme, pages, widgets, etc for a new site in multi-site?
- Why WordPress w/ Nginx Multisite Only Lets Admin Upload ZIP Plugins But Not Themes? [closed]
- May I do multiple micro-sites with different themes in a single wordpress without subdirectory nor subdomain separation?
- How can I have two or more WordPress Pro (paid) themes that form a single website?
- Create link preview for theme wordpress
- Themes are visible in Network, but invisible in sites
- WordPress theme to support single website but with 3 sections for 3 languages
- WordPress multisite condition for certain blog_id’s
- WordPress Multisite – Auto enable theme
- Whats the best Practice for using a different Theme for WebView Apps?
- Creating a stand-alone site from a WordPress sub site
- Updating themes customized by users
- How to handle responsive and non responsive websites in one WordPress Theme?
- In a MS install, can you allow different users to have their own themes?
- How to mass change theme for all Multisite network sites?
- Iterating over every multisite / theme and list the pages
- different image for mobile template block theme
- Export/Import Blog Post from and to sites with different themes?
- Google Apps SMTP for WP MultiSite?
- How to Display BuddyPress Profile Field Data In Multisite Blogs [closed]
- Set up Network Locally on a Flash Drive
- Help with multisite redirect issues using Cherokee OR solid nginx config?
- turning off multi site mode makes XMLRPC fail : you are not allowed to publish posts on this site”
- Pull Custom /wp-admin/css for Non-Admin in Multisite
- Being Forced To Use Sub-Domains on Multisite
- User Role is Not Specifying in WordPress Multisite?
- 301 Redirection After Comment
- Changing Domain Name Broke Database
- Multisite wp-admin goes to blank screen after forwarding URL
- What is with the one month time limit for sub directory installs for multisite network?
- Can I use the same Folder name as a Multisite Blog?
- How to get the blogs owned by a user?
- Choosing the right kind of hosting for a WordPress multisite
- Moving wordpress multi to different domain and vhost – cannot log in and menu problems
- Merge Multiple Sites/Networks (at least 2) into One Site/Network
- Customizing 1 theme for multiple blogs in a multisite setup
- How can I run multiple unique WordPress sites off of one VPS
- Multisite Configurations
- How to update wordpress content of wordpress multi-site subdomain
- Multisite Subdomain Change
- Cross site identifier in a WP Multisite installation
- Multisite: How to get a list of sites by locale
- let user select roles in the wordpress subsites
- Get latest posts from multisite
- How to post same content on multisite?
- Configure redirects with web.config
- Will resetting my database affect other sites on my multisite WordPress install?
- Events Calendar Multisite 404 for events
- WordPress Database Cleanup
- Multisite – How sync posts to multi sites
- WordPress multi site network setup on local server shows sub-directories error
- WordPress Multi site Map Domains
- Remove multisite part from wordpress multisite upload directory
- Optimal setup for Multi Domain WordPress with Woocommerce
- Sub-directory domain on subdomain multisite?
- Multisite error when adding a user: already a member of this site
- Blog switch wpml string translation (multi-site)
- Multisite custom rewrite urls
- Transfer Part of Multisite to new Domain
- Subdirectory and domain multisite installation
- Installed in root, want second in subdirectory
- Prevent site down when importing data from large XML file
- How can I write a rewrite rule to appear to move a multisite?
- Multisite and plugins options
- Aliasing a subdomain on a wordpress network
- Error establishing a database connection – Multi-site with subsite don’t exisit [duplicate]
- Is there any way to give all users access to one blog in a multisite network without using a plugin?
- Some widgets on Multisite not showing up in template for particular theme
- MP4 upload ok, but HTTP500 if I update the file (multisite)
- What is the best way to build a network of WP sites that share the same membership area?
- In a loop, do not display content that does not have a thumbnail
- Global site feed plugin/function for custom post type?
- WordPress multisite broken after network update?
- Multisite subdomain site on secondary domain
- Unexpected Login Redirect in Localhost WordPress Sites
- Problem with subdomain with multisite
- Switch between WordPress multisite language
- Weird Issue – WordPress Multisite – Cannot Access subdomain’s pages