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?
- Cookies in multisite where network sites have their own domain name
- WordPress Job Interview Preparation
- Create site programmatically for WPMU
- Using one media library for a multisite network with WordPress 3.5 media library
- Run a function when a new site is created in WordPress Multisite
- Can’t add user to blog on registration (Multisite)
- Sub-directory blog on a sub-domain WordPress network site
- Customizing Deleted/Archived blogs warning pages
- SQL Query to Get list of all users along with their blogs
- Synchronizing Two WordPress Sites Content
- Multisite Independent User Base
- Why is my multisite installation not showing all the available sites?
- WP_INSERT_POST issue on WordPress Multisite
- PHP Notices appear when browsing any page in admin, but only for child theme, using code from WP Codex
- What is the most efficient way to have two “blogs” on one site?
- Preview posts returns 404
- How can I have multiple URLs pointing to single WordPress installation?
- How to exclude a directory from WordPress permalinks in a Multisite environment?
- Redirect subdomain homepage to domain specific page in wordpress multisite
- Create a network of blogs with WordPress 3
- create new site subsite in wordpress multisite by subscriber user instead of network admin
- Retrieving data from specific multisite blog
- Error 404 on Network Admin and others
- Get just subdirectory name from a multisite URL
- Why my deleted url is redirecting to random post?
- Reset a site in multisite
- Problem uploading images
- Multisite – 404 when accessing sub-sites
- Redirect Site Geologically
- WordPress Network admin options page: how to store options and where will they be stored?
- .htaccess rules for blocking bots with an extra condition
- Wrong filepaths and admin page infinite reload after migrating to aws bitnami
- Multisite not using subdomains as hostname in from address when sending emails
- Cookie signed verification failed – wp-saving-post
- Do I need a Multisite? [closed]
- How can I overhaul a live MultiSite network?
- Hierarchy in multisite
- Create default pages in wordpress multisite
- Remove superadmin role from the “change role to” menu in user listing
- use get_theme_mod from all sites in network
- Replicate network plugins without having to configure it for each subsite?
- How to organize my js files
- Installing multisite network on a bluehost addon domain
- WordPress Multisite URLs and Multiple Updates
- Multisite switch to blog
- How to Force WWW. in Domain With WordPress MU Domain Mapping Plugin?
- Interchanging WordPress Multisite primary site
- Admin users not able to see network menus
- wordpress.mydomian.com 404 Error
- Assign user to belong to a subsite in Multisite instance
- Multisite – SMTP not working on other network sites
- How to get all pages on specific blog after switch_to_blog?
- Get multisite count without php?
- How to create 30 new sites from an export of a master site?
- Moved my site to new host now getting 404
- multisite registration: check existing subdomains while typing
- Cannot login to admin panel in multisite install if subdomain is added to hosts file
- Using a number for limiting registering or banning on multisite
- WPMU and Chrimes Family Link app
- Media Attachment Pages Redirect to Media Files After Migrating to WordPress Multisite