Site logo

Archived topic

deleted functions.php during update

3 replies · Started by Tony on May 31, 2021

Viewing posts 1–4 of 4

Hi, it looks like during an update in April, some of the functions were over overwritten in the functions.php location.
Is there a way to get these back, or are they gone for good? We didn't have a back-up before this update.

Hi there,

Hi, it looks like during an update in April, some of the functions were over overwritten in the functions.php location.
Is there a way to get these back, or are they gone for good? We didn’t have a back-up before this update.

They're gone for good, unfortunately.

We don't advise editing parent theme files as that happens when the theme updates.

Here are the advice way of adding PHP snippets. https://docs.generatepress.com/article/adding-php/

Thanks Elvin.
We normally only use a parent theme as we haven't changed anything in the css or php, however a developer made some additions for our contact forms and put these in the functions.php area without us actually knowing. Then doing the update has clearly written over them.

When making a child theme, is it possible to create one which will replicate all the changes we currently have in our parent theme, or will we need to go back and re-create everything in a new child theme?

Hi there,

you will need to manually move any functions you added to the parent theme to your child theme.

This archived topic is closed to new replies.