WordPress.org

Make WordPress Core

Opened 7 days ago

Last modified 7 days ago

#49438 new defect (bug)

Twenty Twenty: h1 when is_front_page() is a static page

Reported by: SGr33n Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: trunk
Component: Bundled Theme Keywords: has-patch
Focuses: Cc:

Description (last modified by SergeyBiryukov)

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.

Attachments (1)

h1-is_home.patch (511 bytes) - added by SGr33n 7 days ago.

Download all attachments as: .zip

Change History (2)

@SGr33n
7 days ago

#1 @SergeyBiryukov
7 days ago

  • Description modified (diff)
Note: See TracTickets for help on using tickets.