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:
- Bulk activate a theme on multisite
- Allow user to select a theme to install when they signup
- Changing Multisite themes on mass
- 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
- 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?
- 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?
- Individual WordPress sites for students in a program–multisite or individual installs?
- Redirect WordPress MS to no-www version, excepting some dirs and prefixes
- Is WordPress multisite is good to go?
- Pick your brain on wp-config.php if statement for multisite
- Merging versions of wp_posts based on post_title
- Is it possible to create a login for restricted visibility?
- Remove blog slug from WPMU?
- How do I combine wp_redirect and add_filter?
- Pointing multiple subdomains at the same WordPress Installation
- WordPress multisite and one database
- Multisite redirect loop for a single www domain
- Set static page as default front page on newly created sites in multisite
- first load of the page gives 404 error
- Planning on Multisite Before Creating A Network
- Create a Network of Different websites with wordpress
- Some Subdomains on a Multisite Install Not Found
- personal_options hook on WordPress multisite
- WordPress multidomains and subfolders
- Development (multi)site indexed – recommendations to redirect 301 to correct url?
- Page Template Dropdown – Missing In WordPress MultiSite
- Using common slider in all sites
- Multisite   wrong encoding problem
- Letting clients use visual builders plugins/themes on WordPress Multisite installation
- How can I display all Multisite blogs where this user is administrator?
- Is it possible to put a site other than #1 as a Multisite top-level domain?
- Redirect authors from upload.php url to Home page in Multisite
- Multi site and media uploader
- Images on WP Network’s subsite appear only if accessed via main site’s url
- Nginx Multisite redirects (incorrectly) on Chrome IE and Mobile, but works (correctly) on Firefox
- WordPress Multisite platform for different city for single db
- Some widgets on Multisite not showing up in template for particular theme
- Permalinks in Multisite not working
- 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?
- WordPress multi user registration sites
- Generate aggregated feed from member blogs
- Cannot login to admin panel in multisite install if subdomain is added to hosts file
- Common login for websites belonging in different networks
- How to give “author” user role appropriate capabilities to add PollDaddy polls? WordPress multisite
- iis6 multisite and permissions
- Custom link color or stylesheets
- WP Multisite: Do a function after blog is activated
- Activate blog hook
- rename index or homepage
- Change identical page for every site in multisite
- .htaccess on multisite and roots theme?
- WPMU Domain not pinging
- Registration Page
- Multisite and users being listed on network administration dashboard and not main site dashboard
- How to remove index.php from a tag or archive page URL in the root blog?
- There is no featured image in my post in wordpress multisite theme [closed]
- Can we able to post blog on another WordPress blogsite?
- Multisite: should /blog go to a 404 page?
- Setting up wordpress on a hosting server for the first time
- Should I go for Multisite or separate WP Installation?
- In a loop, do not display content that does not have a thumbnail
- Post migration from one site to another site in a network
- WordPressMu network with private sites
- Not being allowed to use some terms in Add New Site in WordPress
- How to redirect root blog to a specific one in multilang WP?