[wp-testers] template_directory ? childtheme_directory ?

Dion Hulse (dd32) wordpress at dd32.id.au
Sat Jan 9 03:27:49 UTC 2010


Well, For a start, If you ask for template_directory, WordPress does not  
know what the file was you were requesting.. WordPress doesnt see the  
/images/blah.png part of the query, It just returns  
http://...../themes/template/ as you requested.

Child theme Template files override the parents Template files, But that  
does not extend to custom files which are within the themes.

Template files are things such as Index.php, archives.php, single.php,  
etc. and Custom templates as well IIRC

On Sat, 09 Jan 2010 14:20:46 +1100, John Asbacher  
<john.asbacher at gmail.com> wrote:

> What I'm trying to get across is...
>
> If you build a child theme and make a call with "template_directory"
> from within your child theme, I would expect that it would search the
> "child-theme" and if the file is not found there to then search in the
> "master-theme" directory.
>
> I might not even understand how child-themes really work. My assumption
> is that if you have a "child-theme" it will look there for the file and
> if it's not found to then look in the "master-theme" directory.
>
> Are there documents that explain this in detail?
>
>
>
>
> On 1/8/2010 3:41 PM, Demetris wrote:
>> On Sat, Jan 9, 2010 at 12:28 AM, John  
>> Asbacher<john.asbacher at gmail.com>  wrote:
>>
>>> WP 2.9.1
>>>
>>> Using template_directory does not allow finding the file in the child  
>>> theme
>>> directory at all.
>>>
>>>
>> SNIP
>>
>>>
>>>
>> I assume this message ended up in the wrong list. :-) But, anyway...
>>
>> As far as I understand:  What makes a child theme a child theme is
>> that it declares (in style.css) a template directory different than
>> its own directory.  And that’s what bloginfo('template_directory')
>> echoes:
>>
>> The template directory declared by the active theme.
>>
>> (When the active theme does not declare a template dir, as is the case
>> with themes that are not child themes, the template directory is
>> assumed to be the same as the stylesheet directory.)
>>
>> This is all intentional.  What is it that you are trying to do?
>>
>> Cheers!
>>
>> Demetris
> *John *
> _______________________________________________
> wp-testers mailing list
> wp-testers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-testers
>


-- 
Dion Hulse / dd32

Contact:
  e: contact at dd32.id.au
  msn: msn at d32.id.au
  skype: theonly_dd32
Web: http://dd32.id.au/


More information about the wp-testers mailing list