How to include any file.php via a hook ?
-
Hello, here’s what I’ve done in functions.php:
/*define constant*/
define(‘childtheme_DIR’, STYLESHEETPATH);then:
/*here we insert, after the regular sidebar,childtheme’s left sidebar*/
add_action(‘bp_after_sidebar’, ’childtheme_include_sidebar_left’);
function childtheme_include_sidebar_left() {
require(childtheme_DIR.’/sidebar_left.php’);
}But this does not load the sidebar_left.php givin an error of file/folder not found in child theme dir, even though is actually there and I can’t figure why. I use this method with frameworks like Hybrid, Thematic and the new Genesis and it always works well.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘How to include any file.php via a hook ?’ is closed to new replies.