[wp-trac] [WordPress Trac] #22314: Add singular.php to template hierarchy
WordPress Trac
noreply at wordpress.org
Wed Jun 10 21:44:36 UTC 2015
#22314: Add singular.php to template hierarchy
-------------------------------------------------+-------------------------
Reporter: chipbennett | Owner: jorbin
Type: enhancement | Status: assigned
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 |
-------------------------------------------------+-------------------------
Comment (by jorbin):
Replying to [comment:14 johnbillion]:
> 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.
I don't think it's too narrow. I think it's the natural progression that
should have been done a long time ago.
>
> 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.
I think it actually reduces complexity since developers will no longer
need to remember that this is the one template tag that doesn't match the
conditionals.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/22314#comment:20>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list