Title: How do I code a static path
Last modified: August 20, 2016

---

# How do I code a static path

 *  [mattpickus](https://wordpress.org/support/users/mattpickus/)
 * (@mattpickus)
 * [15 years ago](https://wordpress.org/support/topic/how-do-i-code-a-static-path/)
 * I want to hardcode a path for my template in WP-Config. I use a parent theme 
   with child themes that act as “skins”. Two questions:
 * 1. Am I correct that I need to set:
 * define(‘TEMPLATEPATH’ to point to the folder containing the parent theme and
 * define(‘STYLESHEETPATH’ to point to the folder containing the child “style.css”
   file?
 * 2. The syntax I have seen says that the proper way to do this is:
 * define(‘TEMPLATEPATH’, ‘/absolute/path/to/wp-content/themes/active-theme’);
 * So what constitutes the absolute path? I have tried these four:
 * [http://mysite.domain.com/wp-content/themes/mytheme](http://mysite.domain.com/wp-content/themes/mytheme)
   /
   mysite.domain.com/wp-content/themes/mytheme mysite.domain.com/wp-content/themes/
   mytheme /wp-content/themes/mytheme
 * and all give me the same (incorrect) result. mysite is in a folder directly below
   the root of my server, and the subdomain has a CNAME alias pointing at that folder.
   I don’t think there are any more levels to add! The directory structure is the
   pure vanilla WordPress default with wp-content directory off the top folder (
   which is just below root) and my themes are directly wp-content.
 * This has to be simple; what am I missing?

Viewing 1 replies (of 1 total)

 *  [Josh Feck](https://wordpress.org/support/users/builtbynorthby/)
 * (@builtbynorthby)
 * [15 years ago](https://wordpress.org/support/topic/how-do-i-code-a-static-path/#post-2128721)
 * Run this: <?php echo get_template_directory() ?>
    and it will return the absolute
   path.

Viewing 1 replies (of 1 total)

The topic ‘How do I code a static path’ is closed to new replies.

 * 1 reply
 * 2 participants
 * Last reply from: [Josh Feck](https://wordpress.org/support/users/builtbynorthby/)
 * Last activity: [15 years ago](https://wordpress.org/support/topic/how-do-i-code-a-static-path/#post-2128721)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
