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 have a wordpress multisite installtion with 5 sites within, the multisite is called Lifestyle

  1. Homes
  2. Cars
  3. Architecture
  4. Holidays
  5. Communities

I am trying to get the blog name, for each blog when viewing in my theme, every function I use returns 'Lifestyle'.

I have tried;

get_bloginfo('name');

get_bloginfo();

global $current_site; var_dump(get_current_site_name($current_site));

get_current_blog();

none of the strings or objects returned contain the blog name, they all contain the site name "Lifestyle" can anyone offer any advice...

share|improve this question
    
social-ink.net/blog/… this looks interesting.... anything you can work with? Wait, I might be misunderstanding.... you are trying to list each site ON said site, or sites on the main site? –  Rev. Voodoo Apr 21 '11 at 11:54
add comment

1 Answer

up vote 6 down vote accepted

This is what you need:

global $blog_id;
$current_blog_details = get_blog_details( array( 'blog_id' => $blog_id ) );
echo $current_blog_details->blogname;

Have a nice multisite! :)

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.