Created
August 6, 2018 16:53
-
-
Save carmoreira/7a35a86f87c25ea61dc45f7a6c16249c to your computer and use it in GitHub Desktop.
Get multisite themes being used
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
if ( function_exists( 'get_sites' ) && class_exists( 'WP_Site_Query' ) ) { | |
$sites = get_sites(); | |
foreach ( $sites as $site ) { | |
switch_to_blog( $site->blog_id ); | |
$curr = get_blog_details(); | |
$theme = wp_get_theme(); | |
echo '<h1>' . $curr->blogname . '</h1>'; | |
echo $theme->Name; | |
$style_parent_theme = wp_get_theme(get_template()); | |
$style_parent_theme_author = $style_parent_theme->get( 'Author' ); | |
echo '<br>(' . $style_parent_theme->Name . ')'; | |
restore_current_blog(); | |
} | |
return; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment