[wp-trac] [WordPress Trac] #49438: Twenty Twenty: h1 when is_front_page() is a static page

WordPress Trac noreply at wordpress.org
Fri Feb 14 17:48:04 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         |   Keywords:  has-patch
  Focuses:                 |
---------------------------+-----------------------------
 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>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list