[theme-reviewers] get_template_part()

Bavota San c at bavotasan.com
Sat Jul 10 13:41:03 UTC 2010


I had asked about this and he suggested I ask the whole list so here it goes...

If I have a file in a sub-folder, can I use get_template_part() to include it or will I still have to use include(TEMPLATEPATH.'/folder/file.php') and will that be allowed?

Thanks.

c.bavota
Web Programmer
c at bavotasan.com
http://bavotasan.com
http://themes.bavotasan.com



Become an Affiliate and earn 40% commission on sale referrals
http://themes.bavotasan.com/affiliates



On 2010-07-10, at 7:59 AM, Chip Bennett wrote:

> Hmm... it appears that the first argument in the get_template_part() function 
> call is a slug. So, I'm assuming that a file path wouldn't work directly.
> 
> As for whether or not it will still be allowed: I'd ask the list as a whole. I 
> assume it would still be allowed for such use case.
> 
> -- 
> Chip Bennett
> chip at chipbennett.net
> www.chipbennett.net
> 
> On Friday 09 July 2010 3:57:58 pm you wrote:
>> Hey Chip,
>> 
>> Out of curiosity, if I have a file in a sub-folder, can I use
>> get_template_part() to include it or will I still have to use
>> include(TEMPLATEPATH.'/folder/file.php') and will that be allowed?
>> 
>> Thanks.
>> 
>> c.bavota
>> Web Programmer
>> c at bavotasan.com
>> http://bavotasan.com
>> http://themes.bavotasan.com
>> 
>> 
>> 
>> Become an Affiliate and earn 40% commission on sale referrals
>> http://themes.bavotasan.com/affiliates
>> 
>> On 2010-07-08, at 8:05 AM, Chip Bennett wrote:
>>> Good morning, Theme Reviewers!
>>> 
>>> Another question: when we start requiring 3.0 compatibility, should we
>>> require include() to be replaced by get_template_part(), for including
>>> generic theme template files?
>>> 
>>> The benefits would be obvious. Would there be any downside to such a
>>> requirement?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wordpress.org/pipermail/theme-reviewers/attachments/20100710/b8599577/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Logo-Bavotasan.png
Type: image/png
Size: 6061 bytes
Desc: not available
URL: <http://lists.wordpress.org/pipermail/theme-reviewers/attachments/20100710/b8599577/attachment-0001.png>


More information about the theme-reviewers mailing list