Codex tools: Log in
Languages: English • 日本語 • (Add your language)
Contents |
The get_site_url() template tag retrieves the site url for a given site. Returns the 'siteurl' option with the appropriate protocol, 'https' if is_ssl() and 'http' otherwise. If $scheme is 'http' or 'https', is_ssl() is overridden.
<?php get_site_url( $blog_id, $path, $scheme ); ?>
<?php get_site_url(); ?>
apply_filters( 'site_url', $url, $path, $orig_scheme, $blog_id );
<?php echo get_site_url(); ?>
Results in the full site URL being displayed
http://www.example.com
get_site_url() is located in wp-includes/link-template.php.