Last Updated On
August 6, 2009
<?php include (TEMPLATEPATH . '/your-file.php'); ?>
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:
<?php get\_template\_part( 'content' ); ?>
It has an optional second paramater too which you can use to include something like: content-post.php by using:
<?php get\_template\_part( 'content', 'post' ); ?>
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.. -.-
You may write comments in Markdown. This makes code easy to post, as you can write inline code like `<div>this</div>` or multiline blocks of code in triple backtick fences (```) with double new lines before and after.
Absolutely anyone is welcome to submit a comment here. But not all comments will be posted. Think of it like writing a letter to the editor. All submitted comments will be read, but not all published. Published comments will be on-topic, helpful, and further the discussion or debate.
Feel free to use our contact form. That's a great place to let us know about typos or anything off-topic.
Copy and paste this code: micuno *
Leave this field empty
Get the CSS-Tricks newsletter