• Resolved rjksn

    (@rjksn)


    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)

    https://www.ads-software.com/plugins/wp-scss/

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Hardcoded Template Path Issue’ is closed to new replies.