[wp-hackers] Page templates in subdirectories

Peter Westwood peter.westwood at ftwr.co.uk
Fri Feb 19 17:09:32 UTC 2010


On 19 Feb 2010, at 15:41, Dan Phiffer wrote:

> Ah, seems that I was missing something after all...
> 
> On Feb 19, 2010, at 9:57 AM, Andrew Nacin wrote:
> 
>> That check was added in 2.9 because while we showed page templates that were
>> in subdirectories, they were never functional. See
>> http://core.trac.wordpress.org/ticket/10959.
>> 
>> On Fri, Feb 19, 2010 at 9:49 AM, Dan Phiffer <dan at phiffer.org> wrote:
>> 
>>> I'm writing a theme that includes custom page templates that I'd like to
>>> keep in subdirectories. There's some code that explicitly removes this
>>> ability (
>>> https://core.trac.wordpress.org/browser/trunk/wp-admin/includes/theme.php#L177)
>>> and I'm curious why it's there.
>>> 
>>> There don't seem to be any filters that I could use to circumvent this, so
>>> without modifying core I seem to be limited to the top-level theme
>>> directory. This seems unnecessarily restrictive, but maybe I'm missing
>>> something?
>>> 


If you have the time and the inclination to create a patch that makes it work then it would be accepted with open arms.

We added the code, as Andrew said, because although we were showing them they never worked and it wasn't easy at the time to work out how to make them work.

-- 
Peter Westwood
http://blog.ftwr.co.uk | http://westi.wordpress.com
C53C F8FC 8796 8508 88D6 C950 54F4 5DCD A834 01C5



More information about the wp-hackers mailing list