get_site_url

get_site_url ( $blog_id = null, $path = '', $scheme = null )

Parameters:
  • (int) $blog_id (optional) Blog ID. Defaults to current blog.
  • (string) $path Optional. Path relative to the site url.
  • (string) $scheme Optional. Scheme to give the site url context. Currently 'http', 'https', 'login', 'login_post', 'admin', or 'relative'.
Returns:
  • (string) Site url link with optional path appended.
Defined at:

Description

Retrieve the site url for a given site.

Returns the 'site_url' option with the appropriate protocol, 'https' if is_ssl() and 'http' otherwise. If $scheme is 'http' or 'https', is_ssl() is overridden.

Related Functions

site_url, network_site_url, get_home_url, get_content_url, get_admin_url

Top Google Results

User discussions

wpseek mobile