Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider passing '/' as argument to home_url() #1158

Closed
kienstra opened this issue May 18, 2018 · 3 comments
Closed

Consider passing '/' as argument to home_url() #1158

kienstra opened this issue May 18, 2018 · 3 comments
Milestone

Comments

@kienstra
Copy link
Contributor

kienstra commented May 18, 2018

In this support topic, the <a> that wraps the site logo has an href value that doesn't end with a slash.

https://www.traileraddict.com/article/fox-planning-6-x-men-movies-2018-2020-report/amp/?cb=16

no-trailing-slash

In many cases, this probably doesn't make a difference. But in that case, it caused a 404.

To correct this, for the home_url value, we might consider passing a '/' argument.

'home_url'              => home_url(),

Could instead be:

'home_url'              => home_url( '/' ),

The documentation says that it's the default usage.

@kienstra
Copy link
Contributor Author

New Issue

Hi @postphotos,
Here's a new issue from a support topic. This would also ideally be in the 0.7.0 milestone, but we've almost begun testing that already.

@westonruter
Copy link
Member

Use of home_url('/') is standard in themes, for example: https://github.com/WordPress/wordpress-develop/blob/186bb7c8a908de977934d77fc5633b493ba2223f/src/wp-content/themes/twentyfifteen/header.php#L36-L38

So I'd say this is a natural fix to make.

@kienstra
Copy link
Contributor Author

Thanks, @westonruter! I'll open a PR now to develop if that's alright.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants