The What
It’s been available for you since version 1.5.0.
Syntax
TEMPLATEPATH
Description
This constant provides the absolute filesystem path (not the URI) to the current theme’s directory. Now the current theme can be a child theme, if enabled, or the parent theme if a child is not enabled. It uses get_template_directory()
as it’s defined value.
define('TEMPLATEPATH', get_template_directory());
This constant is defined in WordPress Core in the file wp-includes/default-constants.php
, which gets loaded from wp-settings.php
(which is loaded from wp-config.php
).
Parameters
There are no parameters as this is a constant.
Return Values
Returns the absolute filesystem path (not the URI) to the current theme’s directory.