This file contains hidden or 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
/* | |
Theme Name: Child Theme for Multisite Network | |
Theme URI: https://github.com/rachelmccollin/wpmu-dev-list-network-sites | |
Description: Theme to support WPMU DEV post on adding alist of all sites to each site in the network. Child theme for the WPMUDEV Parent Theme theme. | |
Author: Rachel McCollin | |
Author URI: http://rachelmccollin.co.uk/ | |
Template: wpmudev-parent-theme | |
Version: 1.0 | |
*/ |
This file contains hidden or 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
function wpmu_list_sites() { | |
$subsites = get_sites(); | |
if ( ! empty ( $subsites ) ) { | |
echo '<ul class="subsites">'; | |
foreach( $subsites as $subsite ) { | |
This file contains hidden or 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
$subsite_id = get_object_vars( $subsite )["blog_id"]; | |
$subsite_name = get_blog_details( $subsite_id )->blogname; | |
$subsite_link = get_blog_details( $subsite_id )->siteurl; | |
echo '<li class="site-' . $subsite_id . '"><a href="' . $subsite_link . '">' . $subsite_name . '</a></li>'; |
This file contains hidden or 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
function wpmu_list_sites() { | |
$subsites = get_sites(); | |
if ( ! empty ( $subsites ) ) { | |
echo '<ul class="subsites">'; | |
foreach( $subsites as $subsite ) { | |
This file contains hidden or 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
/* list of network sites */ | |
ul.subsites { | |
list-style-type: none; | |
background: #3394bf; | |
overflow: auto; | |
} | |
ul.subsites a { | |
float: left; | |
margin: 0.5em; | |
color: #fff; |
This file contains hidden or 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
function wpmu_list_sites() { | |
$subsites = get_sites(); | |
if ( ! empty ( $subsites ) ) { | |
echo '<section class="subsites-container">'; | |
echo '<ul class="subsites">'; | |
This file contains hidden or 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
.subsites-container { | |
background: #3394bf; | |
} | |
ul.subsites { | |
list-style-type: none; | |
overflow: auto; | |
max-width: 1000px; | |
margin: 0 auto; | |
} |
This file contains hidden or 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
ul.subsites a { | |
float: left; | |
margin: 0.5em 1em 0.5em 0; | |
color: #fff; | |
} |
This file contains hidden or 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
ul.subsites { | |
list-style-type: none; | |
overflow: auto; | |
max-width: 1000px; | |
margin: 0 auto; | |
} |
This file contains hidden or 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
include( get_stylesheet_directory() . '/includes/customizer.php' ); |