Code Snippets → WordPress → Include Any File From Your Theme Include Any File From Your Theme Chris Coyier on Aug 6, 2009 <?php include (TEMPLATEPATH . '/your-file.php'); ?>
Thanks Dude.
awesome site for someone who hates learning to suck
If your trying to include another file in (.php file) for your theme, then use
get_template_part()
, which looks like:It has an optional second paramater too which you can use to include something like: content-post.php by using:
Read More:
http://codex.wordpress.org/Function_Reference/get_template_part
You don’t need the backslashes, the “comment preview” didn’t like my underscores unless they had backslashes, and now its screwed up the actual comment.. -.-