Skip to content

Instantly share code, notes, and snippets.

@wjdennen
Created May 10, 2012 00:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wjdennen/2650171 to your computer and use it in GitHub Desktop.
Save wjdennen/2650171 to your computer and use it in GitHub Desktop.
get authors of all network sites
<?php
// update: this code seems to work now
require('/home/username/public_html/wp-load.php');
$list = get_blog_list( 0, 'all' );
foreach ($list as $site) {
switch_to_blog( $site["blog_id"] );
echo $site["path"] . "<br />";
echo "<ul>";
wp_list_authors('hide_empty=0');
echo "</ul>";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment