[wp-hackers] Re: Parent-Child Themes and New Page Templates
skeltoac at gmail.com
Tue Jun 3 19:18:01 GMT 2008
On Tue, Jun 3, 2008 at 1:39 PM, Joost de Valk <joost at joostdevalk.nl> wrote:
> I'm afraid I'm not exactly getting the functionality that is described here,
> could someone enlighten me? :)
WordPress looks in TEMPLATEPATH for template files, including standard
files (e.g. single.php, home.php) and page templates (e.g. link.php or
any php file with a Template Name).
OP wants it to look in STYLESHEETPATH first. That way, if you
distribute a theme that depends on another theme's templates you can
include overriding and additional templates.
For example, you can distribute a theme consisting of nothing but a
stylesheet and use the Template directive (in the stylesheet comment)
to have it rely on the php templates in the Sandbox theme. What you
can't do is include php templates and have them supercede the Sandbox
templates. Instead you must include the desired Sandbox php templates
and not use the Template directive.
More information about the wp-hackers