Site logo

Archived topic

childtheme and functions.php

3 replies · Started by Patrick on March 24, 2015

Viewing posts 1–4 of 4

Hello Tom,
I made a childtheme called generatepress-child which works finde with the style.css , but with the functions.php I get the errormessage:
Fatal error: Cannot redeclare generate_get_defaults() (previously declared in /www/htdocs/mysite/wp-content/themes/generatepress-child/functions.php:88) in /www/htdocs/mysite/wp-content/themes/generatepress/functions.php on line 113

Is it not possible to have the functions.php in the child theme?

It is, but it should only contain your own custom functions.

It seems you copied the functions.php from the parent theme and added it in your child theme.

If you empty it, this error will go away, and you'll be able to add your own custom functions instead.

Thank you Tom,
silly me, should have known that. It is just like with the style.css

Sorry to bother you with that.

best regards
Patrick

No problem at all - happy to help! :)

This archived topic is closed to new replies.