Sunday 21 July 2013

Template and stylesheet path

Once again, you can significantly reduce the number of calls to the database
for the template and stylesheet directories by directly defining them in your
wp-config.php file. To do so, add these two lines of code (replace absolute/
path/ with your own server path and replace /themefolder with the name
of the theme folder you use currently) on their own separate lines:

 

define(‘TEMPLATEPATH’, ‘/absolute/path/to/wp-content/themes/themefolder’);
define(‘STYLESHEETPATH, ‘/absolute/path/to/wp-content/themes/themefolder’);

 

As with the site URL in the preceding section, having these two lines of code
in your wp-config.php file defines the file path within the file structure
in the wp-config.php file, so that WordPress doesn’t need to make an

additional call to the database to discover what the absolute and stylesheet             Book II

paths are.

0 comments:

Post a Comment