WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The function get_current_site() that's in my themes' footer.php file doesn't return the 'site name' property as specified in the docs (and expected in the theme). The purpose of the function is to return all details about the parent site on a multi-site setup.

The only return values I am getting are the blog_id and path. eg:

<?php print_r(get_current_site());?>


stdClass Object ( [id] => 1 [domain] => www.mydomain.co.uk [path] => / [blog_id] => 1 ) 
share|improve this question
up vote 2 down vote accepted

Try using get_current_site_name() to insure you get the site name so something like this:

echo get_current_site_name(get_current_site());

share|improve this answer
Worked liked a charm, thanks. – Dunhamzzz May 23 '11 at 8:50
Glad i could help. – Bainternet May 23 '11 at 9:17

I know this is an old question but get_current_site_name() has been deprecated; use this get_current_site()->site_name or get_current_site()->domain for the domain without the text "Sites" at the end.

share|improve this answer
Great answer Squiggler, thanks for adding it for others who come across this! Welcome to WPSE btw. Please feel free to take the tour. :) – Tim Malone May 23 at 3:04

Your Answer


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.