[wp-trac] [WordPress Trac] #22314: Add singular.php to template hierarchy

WordPress Trac noreply at wordpress.org
Fri May 1 18:21:25 UTC 2015


#22314: Add singular.php to template hierarchy
-------------------------------------------------+-------------------------
 Reporter:  chipbennett                          |       Owner:
     Type:  enhancement                          |      Status:  new
 Priority:  normal                               |   Milestone:  4.3
Component:  Themes                               |     Version:  3.4.2
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch needs-codex needs-testing  |     Focuses:  template
  needs-refresh 2nd-opinion                      |
-------------------------------------------------+-------------------------
Changes (by johnbillion):

 * keywords:  has-patch needs-codex needs-testing needs-refresh => has-patch
     needs-codex needs-testing needs-refresh 2nd-opinion


Comment:

 I'm not too enthused by this. For all post types apart from Pages,
 singular.php is functionally identical to single.php (ie. it provides no
 more granular control, unlike the rest of the hierarchy). It's too narrow
 a use case to warrant introducing a new file into the template hierarchy.

 If you want Pages to use the same template as other post types, you can do
 this by putting `include 'single.php';` into `page.php`.

 The added template hierarchy complexity of introducing `singular.php`
 outweighs its small benefit.

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


More information about the wp-trac mailing list