Core Function
View Source on Trac ↗ home_url()
home_url( mixed $path = '', mixed $scheme = null ) Retrieves the URL for the current site where the front end is accessible.
Parameters 1 required
| Name / Type | Description |
|---|---|
| $path string | Optional. Path relative to the home URL. Default empty. |
| mixed | (string | null) $scheme Optional. Scheme to give the home URL context. Accepts 'http', 'https', 'relative', 'rest', or null. Default null. Required |
Return Value
(string)
Home URL link with optional path appended.
Function Information
Since Version
3.0.0
Source File
wp-includes/link-template.php
Advertisement