<br><br><div class="gmail_quote">On Sat, Apr 23, 2011 at 10:58 PM, Justin Tadlock <span dir="ltr"><<a href="mailto:justin@justintadlock.com">justin@justintadlock.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div text="#000000" bgcolor="#ffffff">
I wrote an extensive post that covers this:<br>
<a href="http://justintadlock.com/archives/2010/11/17/how-to-load-files-within-wordpress-themes" target="_blank">http://justintadlock.com/archives/2010/11/17/how-to-load-files-within-wordpress-themes</a><br>
<br>
Your code would actually look like this (no slash in front of
"lib"):<br>
<br>
<?php locate_template( array( 'lib/my_codes.php' ), true ); ?><div><div></div><div class="h5"><br clear="all"><br></div></div></div></blockquote><div><br>Thanks! Didn't know about the locate_template hook. But the usage of the this hook is not clear in the documentation <a href="http://codex.wordpress.org/Function_Reference/locate_template">http://codex.wordpress.org/Function_Reference/locate_template</a><br>
<br>It would be great if there were some examples of how to load sub-directory files with this hook in this page <a href="http://codex.wordpress.org/Function_Reference/locate_template">http://codex.wordpress.org/Function_Reference/locate_template</a><br>
<br>Some may not know it can be done with this hook by reading this reference page.<br><br>Thanks<br></div></div><br>-- <br><span style="color:rgb(153, 153, 153)">Towfiq I.</span><br><br>