Make WordPress Core

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: aaroncampbell's profile aaroncampbell 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)

11055.001.diff (2.0 KB) - added by aaroncampbell 14 years ago.

Download all attachments as: .zip

Change History (4)

#1 @aaroncampbell
14 years ago

  • Cc aaron@… added
  • Keywords has-patch needs-testing added

#2 @westi
14 years ago

  • Milestone changed from 3.0 to 2.9

#3 @westi
14 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [12135]) Improve get_page_template() to search based on slug and id as well. Fixes #11055 props aaroncampbell.

Note: See TracTickets for help on using tickets.