ThemeShaper Forums » Thematic

Defining Path Constants

(2 posts)
  • Started 2 years ago by theorib
  • Latest reply from em hr
  • This topic is not resolved
  1. Hi all,

    I was looking for a reliable way to define path constants for my child theme in my functions.php file.

    I did find posts related to this in this forum but could not end up with a reliable way of using constants, specially for loading scripts that would always end up loading as a 404 error page in the <head> of my website.

    I end up using a lot of get_bloginfo('stylesheet_directory') calls which I believe will unnecessarily slow my theme down on the long run with lots of queries.

    I use a "child-theme-directory"/library/js to put my scripts on and a few other folders like "child-theme-directory"/library/functions to better organize the whole stuff.

    Any help would be much appreciated!

    Posted 2 years ago #
  2. theorib-

    I think you're getting 404's from using file paths when you need to be assigning a url path.

    Here is a great article that you may find helpful. There is a section in it about setting these url constants in the wp-config.

    http://digwp.com/2009/07/optimize-wordpress-performance-with-the-wp-config-php-file/

    -Gene

    Posted 2 years ago #

RSS feed for this topic

Reply

You must log in to post.