Changes in the codes are getting back to how it was. Why is that?


#1

I’ve made some changes in “widgets/fp-employees.php” and CSS. But few days later those changes gets back into how it was. I’m wondering why is that and how to stop that. Please help!


#2

Did you do the changes directly in the theme editor or did you use a child theme?
Because if you did the changes directly in the theme the changes will be restored then you update the theme.


#3

Hello there,

After theme update, changes will be overridden, so you have to create and to use child theme https://codex.wordpress.org/Child_Themes

Important thing is that when using child theme you have to unregister widget which you want to change from child theme functions.php file, and to register modified one. Search forum for unregister_widget or even beter consult WP codex https://codex.wordpress.org/Function_Reference/unregister_widget

All the Best!


#4

Thank you very much guys!