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…

1
1

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! 🙂

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *