Skip to content
Theme Hybrid
·
WordPress Plugins and Themes

Primary

  • Exhale
  • Members
  • Blog
  • Support
  • Pricing

THEME_DIR

The THEME_DIR constant defines the theme directory path. This is the path to the parent theme directory (or current theme directory if not using a child theme).

This constant should only be used for including PHP files. It should not be used for including features such as images, CSS, and JavaScript. For that, you should use the THEME_URI constant.

Example Usage

The following code shows an example of the THEME_DIR constant being used to load an admin functions file.

require_once( trailingslashit( THEME_DIR ) . 'functions-admin.php' );

Powered by love.

  • Subscribe
  • Facebook
  • Twitter
  • GitHub
  • WordPress.org