Opened 14 years ago
Closed 14 years ago
#11055 closed enhancement (fixed)
Support page-{slug}.php and page-{id}.php template files for pages
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 2.9 | Priority: | normal |
Severity: | normal | Version: | 2.9 |
Component: | Template | Keywords: | has-patch needs-testing |
Focuses: | Cc: |
Description
According to the documentation the order for page templates is 'pagename.php'->'page.php'->'index.php'
but it doesn't work like that. Currently it just supports 'selected custom template'->'page.php'->'index.php'
. I talked to beaulebens and westi in IRC and suggested that the new order works more like the tag templates and goes like this:
'custom template'->'page-{slug}.php'->'page-{id}.php'->'page.php'->'index.php'
Attachments (1)
Change History (4)
Note: See
TracTickets for help on using
tickets.
(In [12135]) Improve get_page_template() to search based on slug and id as well. Fixes #11055 props aaroncampbell.