ampproject/amp-wp

Consider passing '/' as argument to home_url()

kienstra opened this issue · 3 comments

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.

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.

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