[wp-trac] [WordPress Trac] #59767: Front page template selection needs to be more granular

WordPress Trac noreply at wordpress.org
Mon Aug 19 17:17:44 UTC 2024


#59767: Front page template selection needs to be more granular
-----------------------------------+-----------------------------
 Reporter:  flixos90               |       Owner:  (none)
     Type:  enhancement            |      Status:  new
 Priority:  normal                 |   Milestone:  Future Release
Component:  Themes                 |     Version:
 Severity:  normal                 |  Resolution:
 Keywords:  2nd-opinion has-patch  |     Focuses:  template
-----------------------------------+-----------------------------

Comment (by flixos90):

 @poena @juanfra As the development leads for TT5, I would like to bring
 this to your attention for consideration for WordPress 6.7. For context,
 this was opened due to a limitation we ran into while creating the TT4
 templates.

 Basically, the way WordPress core handles the `front-page` template
 doesn't work well for block themes, as it ignores the configuration for
 whether the home page should display the "latest posts" or a "static front
 page". So a block theme has to populate this template with one or the
 other, and thus ignore the respective user choice, since we can't have a
 PHP conditional like `if ( is_home() ) { /* Show blog posts. */ } else {
 /* Show static page content. */ }` in a block theme template.

 Therefore this ticket proposes support for (optional) granular templates
 for the two scenarios (e.g. `front-page-static` and `front-page-blog`).
 This is a simple change, but of course somewhat major as it introduces a
 new kind of supported template. I think it's worth moving this forward, as
 this could go hand in hand with a better handling of the user preference
 in the TT5 theme.

 Please let me know your thoughts and any questions you may have.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/59767#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list