functions.php in child theme folder ends in fatal error
-
Hey there!
I am using the template “flex”, and trying to modify some css-statements…
Some css-styles are declared in a .php-file placed in: \assets\css\css-generate.php
The problem is, that my changed had no effect.. (the original css-styles were still in place). I foundm that the css-generate.php was called in the funtions.php.
Here is part of the pcode of the orig file:
if(!function_exists('md_theme_scripts')) { function md_theme_scripts() { wp_enqueue_style( MD_THEME_NAME.'-generate', MD_THEME_URI . '/assets/css/css-generate.php', '', '', 'all' ); add_action( 'wp_enqueue_scripts', 'md_theme_scripts' ); }So, here the original css-generate.php was still being called.
Therefore I COPIED the functions.php in my child theme…
Thinking that now it would include the css-generate.php from the child-theme’s /addets/css folder…BUT instead I get this error:
Fatal error: Cannot redeclare md_register_sidebars() (previously declared in C:\xampp_environments\xampp181\xampp\htdocs\mediakraft\wp-content\themes\flex_child\functions.php:130) in C:\xampp_environments\xampp181\xampp\htdocs\mediakraft\wp-content\themes\flex\functions.php on line 128
What am, I doing wrong?
I thought the chidl theme functions.php would completely overwrite the one fro the parent theme.
The topic ‘functions.php in child theme folder ends in fatal error’ is closed to new replies.