problem with "require_once" in child theme
-
Hi,
I am trying to modify my child theme. Right now the function.php has got the following code:
require_once( get_template_directory() . '/admin/main/options/02.homepage.php' );I have edited the 02.homepage.php and saved it under the same directory structure in my child theme. If I change the function.php code in the parent theme to
require_once( get_template_directory() . '/../child_theme/admin/main/options/02.homepage.php' );it works fine. But if I write the same code in my child theme function.php it doesn’t work. If I write
get_stylesheet_directorythe site goes blank.I read somewhere that if the code doesn’t have
if ( ! function_exists…
before, then you can’t overwrite the parent function in your child theme.
Any ideas? Appriciate the help!
The topic ‘problem with "require_once" in child theme’ is closed to new replies.