Hot answers tagged


The Codex example for home_url() says you want home_url( '/' ) to get the blog's URL with a trailing slash. Alternatively you could use trailingslashit( home_url() ). That may be safer if your site's home option somehow ends up stored with a trailing slash, since it looks like get_home_url() assumes it isn't, but that ought not happen.

Only top voted, non community-wiki answers of a minimum length are eligible