Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
/**
* @author AppPresser
*
* Lets you use different child themes for multisite.
*
* Needs to added as a mu-plugin. So create a new file and
* place it in the wp-content/mu-plugins/ folder.
*
* Name your child theme folders using the blog id:
*
* app-theme-14, but remove the ion-ap3-child theme.
*/
function my_app_child_theme( $theme_slug ) {
$new_theme_slug = 'app-theme-' . get_current_blog_id();
$child_theme = wp_get_theme( $new_theme_slug );
if ( $child_theme->exists() ) {
$theme_slug = $new_theme_slug;
}
return $theme_slug;
}
add_filter( 'appp_theme', 'my_app_child_theme' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.