Opened 6 years ago
Closed 6 years ago
#34842 closed enhancement (wontfix)
Simplify get_home_template() template candidates
Reported by: | Rahe | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Themes | Keywords: | |
Focuses: | template | Cc: |
Description
Hi,
I was wondering if this is mandatory that in the get_home_template function we have to specify home.php AND index.php as fallback as soon as we have the fallback on index.php at the end of template-loader.php ?
Attachments (1)
Change History (8)
#2
@
6 years ago
- Summary changed from Update get_home_template to Simplify get_home_template() template candidates
- Type changed from feature request to enhancement
This ticket was mentioned in Slack in #core by swissspidy. View the logs.
6 years ago
#5
@
6 years ago
This patch changes the behavior of get_home_template()
in the case where the theme has a paged.php and an index.php but no home.php.
The current behavior is to use index.php for both /
and /page/2/
.
With the patch, the behavior changes to using index.php for /
but paged.php for /page/2/
.
Note: See
TracTickets for help on using
tickets.
Apart from saving some if/else checks in
template-loader.php
, I don't see a reason whyget_home_template()
must specifyindex.php
as a template as well. I guess it makes the whole template hierarchy more clear.See also #14310