Skip to content

Instantly share code, notes, and snippets.

@eddiejhong
Created June 20, 2013 21:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eddiejhong/5826876 to your computer and use it in GitHub Desktop.
Save eddiejhong/5826876 to your computer and use it in GitHub Desktop.
How to include files in the wordpress directory without absolute paths. *Pathing should be delegated to the code. Use get_template_directory() to dynamically get the path to the template.
<?php
$path = get_template_directory();
include($path."/example.php");
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment