Title: templatepath
Last modified: August 18, 2016

---

# templatepath

 *  [andwat](https://wordpress.org/support/users/andwat/)
 * (@andwat)
 * [21 years, 1 month ago](https://wordpress.org/support/topic/templatepath/)
 * The codex states that: “The constant TEMPLATEPATH is a reference to the absolute
   path to the current theme directory.”
 * I don’t think that the codex is correct here. I think that TEMPLATEPATH points
   to the current template directory. This will differ from the theme directory 
   if the theme in question specifies a parent theme. For example, one of my themes,
   TheGatesWay, includes in its header the line:
    Template:winterway So winterway
   is the parent theme, and the template (i.e. the .php files) is inherited from
   it.
 * TEMPLATEPATH correctly refers to the directory winterway. It does not refer to
   the directory in which TheGatesWay’s style.css lives, and nor should it.
 * It would be nice if there was another constant, THEMEPATH, that did refer to 
   the current theme directory. Yes, one can get to this using bloginfo(â€™stylesheet_directoryâ
   €™). But a predefined constant for the theme, similar to the one for the template,
   would be neat and symmetrical.
 * To summarize: I’ve pointed to what I think is a minor error in the codex; and
   I’ve requested that future versions of WP include a new constant. To conclude:
   sorry to have been so long-winded about this.

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [Root](https://wordpress.org/support/users/root/)
 * (@root)
 * [21 years, 1 month ago](https://wordpress.org/support/topic/templatepath/#post-192278)
 * Its a bloginfo parameter already surely?
 *  [Ryan Boren](https://wordpress.org/support/users/ryan/)
 * (@ryan)
 * [21 years, 1 month ago](https://wordpress.org/support/topic/templatepath/#post-192279)
 * Codex updated. There is not currently a constant defined for it, but you can 
   get the theme/stylesheet path with get_stylesheet_directory().
 *  [Ryan Boren](https://wordpress.org/support/users/ryan/)
 * (@ryan)
 * [21 years, 1 month ago](https://wordpress.org/support/topic/templatepath/#post-192280)
 * Yes, you can use bloginfo(‘stylesheet_directory’) too.
 *  [Root](https://wordpress.org/support/users/root/)
 * (@root)
 * [21 years, 1 month ago](https://wordpress.org/support/topic/templatepath/#post-192283)
 * And there is a template path as well.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘templatepath’ is closed to new replies.

 * In: [Everything else WordPress](https://wordpress.org/support/forum/miscellaneous/)
 * 4 replies
 * 3 participants
 * Last reply from: [Root](https://wordpress.org/support/users/root/)
 * Last activity: [21 years, 1 month ago](https://wordpress.org/support/topic/templatepath/#post-192283)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
