Make WordPress Core

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#16689 closed defect (bug) (fixed)

functions.php file treated as page template file

Reported by: chodorowicz Owned by:
Milestone: 3.2 Priority: normal
Severity: minor Version: 3.1
Component: General Keywords: has-patch commit 3.2-early
Focuses: Cc:


When the string Template Name: is put into functions.php, this file is treated by WP as page template file. This situation is very unique, but still I believe that WP shouldn't even try to treat functions.php as page template file.


  1. place // Template Name:whatever in functions.php. The new template shows up in the select box for page template in page edit screen.

accompanying discussion http://wordpress.stackexchange.com/questions/10537/get-name-of-the-current-template-file/10543

Attachments (1)

16689.diff (409 bytes) - added by nacin 11 years ago.

Download all attachments as: .zip

Change History (4)

11 years ago

#1 @nacin
11 years ago

  • Keywords has-patch commit 3.2-early added
  • Milestone changed from Awaiting Review to Future Release

#2 @nacin
11 years ago

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

(In [17539]) Avoid functions.php from ever being treated as a page template. fixes #16689.

#3 @nacin
11 years ago

  • Milestone changed from Future Release to 3.2
Note: See TracTickets for help on using tickets.