[wp-trac] [WordPress Trac] #49438: Twenty Twenty: h1 when is_front_page() is a static page
WordPress Trac
noreply at wordpress.org
Sat Feb 15 01:44:30 UTC 2020
#49438: Twenty Twenty: h1 when is_front_page() is a static page
---------------------------+------------------------------
Reporter: SGr33n | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Bundled Theme | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
---------------------------+------------------------------
Description changed by SergeyBiryukov:
Old description:
> Hi,
> I see that template-tags.php doesn't assign the h1 to the site title
> correctly when you assign a static page to the front page.
>
> It's due to the code
> 'condition' => ( is_front_page() || is_home() ) && ! is_page()
>
> is_page(), infact, returns true on is_front_page() in that case.
>
> I suppose it should be:
>
> 'condition' => is_front_page() || ( is_home() && ! is_page() )
>
> Diff patch attached.
New description:
Hi,
I see that template-tags.php doesn't assign the h1 to the site title
correctly when you assign a static page to the front page.
It's due to the code
`'condition' => ( is_front_page() || is_home() ) && ! is_page()`
is_page(), infact, returns true on is_front_page() in that case.
I suppose it should be:
`'condition' => is_front_page() || ( is_home() && ! is_page() )`
Diff patch attached.
--
--
Ticket URL: <https://core.trac.wordpress.org/ticket/49438#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list