[theme-reviewers] get_template_part()

Chip Bennett chip at chipbennett.net
Fri Jun 8 12:57:12 UTC 2012


get_template_part() should be used for *template* - i.e. *front-end* -
files. It is perfectly acceptable (and correct) to use include()/require()
for *functional* files to be included within functions.php. There may still
be cases where get_template_part() is insufficient, in which case
locate_template() should be used directly.



On Fri, Jun 8, 2012 at 6:52 AM, Central Victorian Irish Association <
info at cvia.com.au> wrote:

>   Hello My Darlings. [image: Smile with tongue out]
> I have a guy questioning the get_template_part() call on internal files.
> He claims basically that it is not required because it doesn’t support
> directories. So, he wants to be an exception. I am saying
> No-Can-Be-Doneskies but wanna get some experienced feedback before I tell
> him to behave.
> http://themes.trac.wordpress.org/ticket/7896
> Thanks,
> Dan
> _______________________________________________
> theme-reviewers mailing list
> theme-reviewers at lists.wordpress.org
> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wordpress.org/pipermail/theme-reviewers/attachments/20120608/8ea42045/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 1146 bytes
Desc: not available
URL: <http://lists.wordpress.org/pipermail/theme-reviewers/attachments/20120608/8ea42045/attachment-0001.png>

More information about the theme-reviewers mailing list