You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
There are a few places in the code where
home_url()
andget_home_url()
are called without any arguments. These should behome_url( '/' )
andget_home_url( null, '/' )
respectively (or for simplicity just usehome_url( '/' )
everywhere).Calling
home_url()
orget_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 likehttps://example.com/example
- this will issue a 301 redirect tohttps://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( '/' )
.The text was updated successfully, but these errors were encountered: