How to get the via url (or site name) on a wordpress network’s home page?
Instead of get_site_url(), use get_home_url(). This will return the URL of the site you’re in. You can also get the URL of a different site in your Multisite network by passing that site’s blog_id (ie, $url = get_home_url( 2 );). (I suspect that get_site_url() is a holdover from the early days of Multisite; when Multisite … Read more