Reputation
438
Top tag
Next privilege 500 Rep.
Access review queues
Badges
1 5 11
Newest
 Yearling
Impact
~49k people reached

  • 0 posts edited
  • 0 helpful flags
  • 33 votes cast
Nov
27
awarded  Yearling
Oct
15
accepted Get name of the current template file
Mar
26
awarded  Favorite Question
Sep
7
awarded  Self-Learner
Sep
3
awarded  Good Question
Nov
22
awarded  Famous Question
Oct
27
awarded  Nice Question
Oct
5
comment Get name of the current template file
Yes, it's true. To get the name of included file you'd probably need to use something like this echo __FILE__;
Sep
9
revised Get name of the current template file
adding simpler version, direct printing template file name in template file
Apr
15
awarded  Yearling
Dec
5
awarded  Notable Question
Nov
6
awarded  Popular Question
Oct
19
answered Custom Post Type Archives by Date with Custom Permalink
Oct
14
awarded  Critic
Jul
28
awarded  Popular Question
Jun
24
awarded  Student
Apr
9
answered Get name of the current template file
Feb
28
awarded  Commentator
Feb
28
comment Get name of the current template file
@MikeSchinkel - it already has a patch :) core.trac.wordpress.org/ticket/16689
Feb
27
comment Get name of the current template file
Yes, the actual need was to display the name of the currently used theme file, the code I posted had a flaw (which can be solved by moving the function out of the main theme folder), but @t31os' solution is much cleaner and fulfills the need, but, if I understand you correctly, the real problem (WP shouldn't try to read functions.php as page template file) still persists. I'll try to post it on trac, haven't done it yet. Greetings!