[theme-reviewers] get_template_part vs locate_template
Curtis McHale
curtis at curtismchale.ca
Fri Apr 22 16:34:34 UTC 2011
I'm reviewing a theme and I've found uses of get_template_part where I
believe that locate_template is the proper item. Specifically the code below
loads the custom stylesheet.
<?php get_template_part('css/custom-css')?>
It was my understanding that in this case we should use:
<?php locate_template( array( '/css/custom-css.css' ), 1); ?>
and that get_template part was to call a file in the same directory like
loop-main.php. Is there established best practice and if so what is it? Is
the use above an okay way to call a custom stylesheet in to the theme? If
not what way is currently advised?
Curtis McHale
PH: 604.751.3482
http://www.curtismchale.ca
Linkedin: http://www.linkedin.com/in/curtismchale
Twitter: twitter.com/curtismchale
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wordpress.org/pipermail/theme-reviewers/attachments/20110422/60fb035e/attachment.htm>
More information about the theme-reviewers
mailing list