Last active
April 20, 2019 15:18
-
-
Save stillatmylinux/6f8eb95ee672063e4b57bb5fb5299c56 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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