WordPress TEMPLATEPATH

Where in WordPress is TEMPLATEPATH initially set?

Related posts

Leave a Reply

2 comments

  1. TEMPLATEPATH has been deprecated.

    Use the following to include files:

     // Load entire ThemeSmith framework
     include get_template_directory() . '/my-extra-functions.php';
    
  2. It points to the template of your wordpress that is active.

    <?php echo TEMPLATEPATH; ?>
    

    This will give you the actual path.

    Incase you are using a child theme, then this points to the childtheme. This is really handy because…

    bloginfo('template_url')
    

    This doesn’t point to the child theme and creates problem for new developers using child theme.