Opened 15 years ago
Closed 15 years ago
#12635 closed defect (bug) (fixed)
template-loader does not check for child theme's index.php
Reported by: | koopersmith | Owned by: | nacin |
---|---|---|---|
Milestone: | 3.0 | Priority: | normal |
Severity: | normal | Version: | 3.0 |
Component: | Template | Keywords: | |
Focuses: | Cc: |
Description
When template-loader reaches the last case in the if statement, it checks for only the parent theme's index.php. Template-loader should first check for the child's index.php, then the parent's index.php. It should use locate_template, which will check for both the parent and the child and behave accordingly.
To replicate the bug, make a parent and child theme each with only index.php. In no instances should the parent's index.php be shown, but on archive pages (and others) it will appear.
For easier bug replication:
- Make a child theme of twentyten with a blank index.php
- Delete twentyten's archive.php
- Navigate to an archive page
Attachments (2)
Change History (5)
Note: See
TracTickets for help on using
tickets.
Interesting thought. Should probably introduce
get_index_template()
which returnsget_query_template('index')
.