Title: Hardcoded Template Path Issue
Last modified: August 21, 2016

---

# Hardcoded Template Path Issue

 *  Resolved [rjksn](https://wordpress.org/support/users/rjksn/)
 * (@rjksn)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/hardcoded-template-path-issue/)
 * Hey,
 * I hope this is working better than the other one I was using for a brief period.
   One thing though. Sometimes, people move their content directories and as you
   know you’ve hardcoded **ABSPATH . ‘wp-content/themes/’**
 *     ```
       if (!defined('WPSCSS_THEME_DIR'))
           define('WPSCSS_THEME_DIR', ABSPATH . 'wp-content/themes/' . get_stylesheet());
       ```
   
 * Now instead of having to troubleshoot everthing, and work and slave to get it
   working. WP has a great function
 * You should use:
    **get_template_directory() **or **get_stylesheet_directory()**
 * (get_template_dir… is for the parent templates, and get_stylesheet_dir… is for
   the child theme dir)
 * [http://wordpress.org/plugins/wp-scss/](http://wordpress.org/plugins/wp-scss/)

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

 *  Thread Starter [rjksn](https://wordpress.org/support/users/rjksn/)
 * (@rjksn)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/hardcoded-template-path-issue/#post-4424795)
 * Ie:
 *     ```
       if (!defined('WPSCSS_THEME_DIR'))
           define('WPSCSS_THEME_DIR', get_template_directory() );
       ```
   
 *  Plugin Author [Connect Think](https://wordpress.org/support/users/connectthink/)
 * (@connectthink)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/hardcoded-template-path-issue/#post-4425072)
 * Thanks for pointing that out. Just released a quick fix in 1.1.2. Great suggestion!

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

The topic ‘Hardcoded Template Path Issue’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-scss_222222.svg)
 * [WP-SCSS](https://wordpress.org/plugins/wp-scss/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-scss/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-scss/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-scss/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-scss/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-scss/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Connect Think](https://wordpress.org/support/users/connectthink/)
 * Last activity: [12 years, 5 months ago](https://wordpress.org/support/topic/hardcoded-template-path-issue/#post-4425072)
 * Status: resolved