So, the topic of this month’s Portland Wordpress User’s Group is “Child Themes”. I’ve never really utilized this functionality of WordPress until a few days ago when I worked support into The Platypus Theme.
One thing that I noticed was that the value of the constant TEMPLATEPATH always points to the “parent” theme. Which, after some thought, is to be expected. However, I was left wondering, How do I access custom files that I have put inside my child theme’s folder?
After some digging around in the core, I was able to piece together this solution:
$themes = get_themes(); $current_theme_name = get_current_theme(); $current_theme = $themes[ $current_theme_name ]; $templatepath = WP_CONTENT_DIR . $current_theme['Stylesheet Dir'];
Here, we have defined the variable $templatepath which we can use to find the path to any custom file in our child theme.
Hope this is useful to someone.
Please note, this solution will only work on versions of WordPress 2.6 or greater.


You should better use
STYLESHEETPATH :)