I needed to do some small ajustments to functions-enfold.php. What is the best practice to do so my changes dont get overwriten when the theme is updated?
Hey Knut!
Thank you for using our theme.
Updates only override files of the parent theme.
To avoid your changes to be overwritten, you should use a child theme and place your changes in functions.php of the child theme. This file will be loaded before functions.php of the parent theme.
If you do not want to use a child theme, I would suggest you create a file like my_functions.php, put your code inside that file and add at the bottom of functions.php:
require_once('my_functions.php');
If you do not delete the files on update you will only have to add this line after updateing the theme.
Best regards,
Günter
Thanks. I have a child theme. If I undestand you right I can do this change in functions-enfold.php in the child theme functions.php?
Hi!
In this case no. However what you can do is copy the function to your functions.php file in your child theme and edit it there. Because the functions are wrapped in a function_exists check your child theme functions will load first and the parent will not.
Regards,
Devin
Hello,
I have a very high problem: I´ve edit a part of my functions-enfold.php and I can´t do anything because there´s a error message
Please, sent me ASAP the functions-enfold.php to solve this problem!
Hey!
Please go to /wp-content/themes/enfold/functions.php via FTP and undo the changes you made.
If you would like us to look into it, please start a new thread and attach temporary admin logins and FTP logins in private content field. If you post them here, creator of this thread will be able to see them as well.
Cheers!
Yigit
Thank u,
Someone is going to help me. If I have more problems I will tell you, but also if this help me.
Thank u
Hello again! Thank you, it works!
Cheers