How to Find the Correct Theme Path for Child Themes?
I’m currently trying to adapt my custom theme to the BP 1.1 Beta which is working out quite nice. However I have one issue about calling the templatepath. I’ve read about it before here (bottom comments by Detective), but I’m not sure how to actually solve the problems.
The setup is BP 1.1, WPMU 8.4a all working perfectly. It’s just a parent/child theme issue that I’m not sure how to solve (with locate_template)
1. For one I tried to replicate the custom login page with this:
echo '<link rel="stylesheet" type="text/css" href="' . locate_template('template_directory') . '/custom-login/custom-login.css" />';
With the custom-login folder placed in the bp-default theme, which does not work.
2. Also I tried to import my various functions from the old theme (this gives me a white screen). In my functions.php I forward to
require_once (TEMPLATEPATH . '/library/functions/theme_variables.php');
and define the functions path in theme_variables.php:
$functions_path = TEMPLATEPATH . '/library/functions/';
now they should be working when I call them from functions.php like this:
require_once ($functions_path . 'buddypressfunctions.php');
Thanks a bunch everyone!
- The topic ‘How to Find the Correct Theme Path for Child Themes?’ is closed to new replies.