Codex tools: Log in
Contents |
Retrieve stylesheet directory Path for the current theme/child theme.
Note: Does not contain a trailing slash.
Returns an absolute server path (eg: /home/user/public_html/wp-content/themes/my_theme), not a URI.
To retrieve the URI of the stylesheet directory use get_stylesheet_directory_uri() instead.
<?php get_stylesheet_directory() ?>
None.
Include a PHP file
<?php include( get_stylesheet_directory() . '/includes/myfile.php'); ?>
get_stylesheet_directory() is located in wp-includes/theme.php.