This topic has 5 replies, 2 voices, and was last updated 2 years, 3 months ago ago by Rameez Pathan
I have added some custom code in functions.php, what will happen if i update the theme?
Do i have to add that code again?
Hello, @Rameez Pathan,
It will override your Custom Code with the new file, so it will not work for you and you have to add the code again.
That is why we always recommended using the Child Theme for Customization purposes, Please Install and Activate the Child Theme: https://www.8theme.com/documentation/docs/child-theme/ and then add/insert your Custom Code in Child Theme functions.php file, then whenever you will update the Parent Theme, your code will be safe.
Regards 8Themes Team.
I never used a child theme, so I don’t know how to use it with the main theme, if you have any tutorial video or any documentation about it, please send me otherwise it is okay because I will download the code which I have added in functions.php
Thanks
Hello, @Rameez Pathan,
You just have to Install the Child Theme from Appearance >> Themes.
Then Activate the Child Theme from Appearance >> Themes.
Then you have to go to Cpanel >> Wp-Content/Themes and edit the xstore-child theme folder.
You will find the functions.php file in it, simply add your code in Child Theme functions.php file and check back your site after removing the cache.
Regards 8Themes Team.
wow nice, thanks for the guidance.
Tagged: custom code, functions.php, theme update, woocommerce, wordpress
The issue related to '‘I have added some custom code in functions.php, what if i update the theme?’' has been successfully resolved, and the topic is now closed for further responses