Return a list of sites on the wordpress multisite network


A simple function that returns the list of all wordpress child websites in the network. The code below just shows all the URL and unlinked.

 $blog_list = get_blog_list( 0, 'all' );
 krsort($blog_list);
 foreach ($blog_list AS $blog)
 {
     echo 'Blog '.$blog['blog_id'].': '.$blog['domain'].$blog['path'].'<br />';
 }

and you’re all done !!

Advertisements