WordPress TEMPLATEPATH

Where is TEMPLATEPATH installed in WordPress?

+5
source share
2 answers

Indicates a valid dictionary template.

<?php echo TEMPLATEPATH; ?>

This will give you the actual path.

If you use a child theme, this indicates a child cane. This is really convenient because ...

bloginfo('template_url')

This does not indicate a child theme and poses a problem for new developers using a child theme.

+8
source

TEMPLATEPATH is deprecated .

To include files, use the following:

 // Load entire ThemeSmith framework
 include get_template_directory() . '/my-extra-functions.php';
+7
source

All Articles