• Hi. I’m using the theme “notes-blog” and whenever I try to use a function.php file in my child them, I get this error:

    “Fatal error: Cannot redeclare site_header_style() (previously declared in /home/p52347r2/public_html/site/wp-content/themes/doww-console/functions.php:59) in /home/p52347r2/public_html/site/wp-content/themes/notes-blog/functions.php on line 73

    In one version I kept the content exactly like the parent version. In the other, I put in only the additional code. No matter what I do, I get the error message — until I delete the functions.php file from my child theme.

    So, what might I be doing wrong?

    Thanks for helping!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Actually that is the one file you don’t want to copy to your child theme as it acts as a plugin of sorts.
    Just make the modifications to your parent file and let the child theme pick it up.

    Thread Starter laptophobo

    (@laptophobo)

    Well, in the Codex and several other sources, it says the opposite. That I should not make changes to the parent functions.php file, but instead create a child theme functions.php to work from. It does, however, mention that the file differs from the others.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘child them functions.php error’ is closed to new replies.