[wp-trac] [WordPress Trac] #7086: Look for Template Files in Stylesheet Directory First

WordPress Trac wp-trac at lists.automattic.com
Tue Jun 3 18:46:09 GMT 2008


#7086: Look for Template Files in Stylesheet Directory First
-------------------------+--------------------------------------------------
 Reporter:  ThemeShaper  |       Owner:  anonymous
     Type:  enhancement  |      Status:  new      
 Priority:  normal       |   Milestone:  2.7      
Component:  General      |     Version:           
 Severity:  normal       |    Keywords:           
-------------------------+--------------------------------------------------
 '''PROBLEM:''' I can make new, CSS-only, child themes by including
 "TEMPLATE:
 define-parent-theme-here" in the comments of my stylesheet, inheriting all
 the page templates of a parent theme. I can override and add new functions
 by including a functions.php file with this child theme. BUT! What if I
 want
 to add new page templates? Can I add foo.php or bar.php in the folder of
 my
 child theme and make it available in WRITE > PAGE?

 Nope, I can't. WordPress Should change this.

 '''EXAMPLE:'''

 {{{
 sandbox
 ..header.php, sidebar.php, etc.
 ..links.php
 ..archives.php
 }}}

 ''Links'' and ''archives'' are existing custom template files


 {{{
 child-theme
 ..style.css
 ..functions.php
 ..foo.php
 ..bar.php
 ..header.php
 }}}


 ''foo'' and ''bar'' are new page templates that should become available in
 WRITE > PAGE when ''child theme'' is the active theme—but they currently
 don't. Plus, WordPress should use the header template from child-theme.

 '''BONUS:''' Why would I want to do this? More custom themes, less work.

 A blog is a blog is a blog: most custom theming work happens on the home
 page. Make a new home-page.php file in a child theme and with some fun CSS
 and javascript you can make a host of easily maintained themes; most of
 the
 code is recycled from the pristine "parent theme". Imagine a hundred
 clients
 with drastically different sites, all with easily upgraded code: overwrite
 the parent theme, tweak home-page.php. Done.

 This should also add a lot more options and possibilities to the coming
 WordPress Theme Marketplace, speeding up theme vetting (most of the code
 being inherited from The Sandbox) while providing some even more
 dramatically new variations.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/7086>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list