-
-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
There are a few places in the code where home_url() and get_home_url() are called without any arguments. These should be home_url( '/' ) and get_home_url( null, '/' ) respectively (or for simplicity just use home_url( '/' ) everywhere).
Calling home_url() or get_home_url() without arguments will output a URL without a trailing slash. For most WordPress sites this will not actually make any difference, but for sites where WordPress is installed in a subdirectory, the result will be a URL that looks like https://example.com/example - this will issue a 301 redirect to https://example.com/example/ instead of rendering the home page directly.
See https://github.com/Automattic/_s/blob/master/header.php for an example of using home_url( '/' ).
Metadata
Metadata
Assignees
Labels
No labels