Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I need to show all sub domains/directory in my wordpress multiuser, for eg: blog1 blog2 blog3

Is their any template tags to do this? stuck with this help me out guys.

share|improve this question
add comment

1 Answer

take a look at this plugin :

Multi-Site Site List Shortcode

or if you prefer a snippet then:

$blog_list = get_blog_list( 0, 'all' );
if (count($blog_list) > 1){
    echo '<ul>';
    foreach ($blog_list AS $blog) {
        echo '<li>Blog '.$blog['blog_id'].': '.$blog['domain'].$blog['path'].'</li>';
    }
    echo '</ul>'
}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.