get_current_site() not returning site name

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:

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

Returns:

stdClass Object ( [id] => 1 [domain] => www.mydomain.co.uk [path] => / [blog_id] => 1 ) 

Related posts

Leave a Reply

2 comments

  1. 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.