Home › Forums › WoodMart support forum › Override PHP files
Override PHP files
- This topic has 7 replies, 2 voices, and was last updated 5 years, 4 months ago by
Elise Noromit.
-
AuthorPosts
-
July 17, 2020 at 6:18 pm #212005
ShopixParticipantHello,
We have a lot of custom features or changes that we want to make to the Woodmart demo theme that we imported. Is it in any way possible to implement this changes or override PHP files from the Woodmart theme in such manner that updating Woodmart theme will not result in lost of changes?
Thank you!
July 18, 2020 at 7:54 am #212068
Elise NoromitMemberHello,
Please install and activate the child theme of Woodmart and add all your customization PHP code to the functions.php of the child theme.
Each time you will update the theme, you need to update the parent theme and never update the child.
In this case, all your customization will be never lost.
Best Regards
July 22, 2020 at 12:56 pm #213182
ShopixParticipantHi Elise,
And this can be done for every single file of the parent theme? For example, we’re defining a new footer layout (so touching multiple files).
Any option to customize without touching the parent theme so changes will not get lost on update?
Thanks!
July 22, 2020 at 2:32 pm #213230
Elise NoromitMemberHello,
You need to install the child theme and then all the PHP snippets are inserted in functions.php JS in the Theme Settings > Custom JS, CSS in the Theme Settings > Custom CSS. In this case, all the settings, customization are contained in the child theme and would remain after you update the parent theme.
Best Regards
July 22, 2020 at 2:47 pm #213236
ShopixParticipantHello Elise,
Can you please detail what you mean by snippets? Our customization also include changes to PHP, CSS, JS files and so on.
July 22, 2020 at 10:17 pm #213309
Elise NoromitMemberHello,
A snippet is an independent code part. I mean completed part of code, which can be copied pasted.
JS in the Theme Settings > Custom JS,
CSS in the Theme Settings > Custom CSS.Best Regards
July 24, 2020 at 11:40 am #213828
ShopixParticipantHi Elise,
So basically we should override the functions that we want to customize in our functions.php. So it’s pretty much the standard WP approach.
Thanks, topic can be closed.
July 24, 2020 at 3:22 pm #213952
Elise NoromitMemberYou are welcome! If you have any questions please feel free to contact us.
Best Regards
-
AuthorPosts
Tagged: child-theme, custom, override, parent theme
The topic ‘Override PHP files’ is closed to new replies.
- You must be logged in to create new topics. Login / Register
