Hello Team,
I have customized several plugins (including opt in builder) .. + other plugin none related to the theme (event manager, OTP)…
The issue is that if I update plugins or wordpress version, all the code customized is lost.
So I wanted to know if you know where the customized code should be placed within wordpress, so we don’t lose the code when we update wordpress or a plugin.
Thank you.
Lamiaa
Hi,
You’re absolutely right to be cautious updating WordPress core or plugins does overwrite their files, which will cause any direct customizations to be lost.
To avoid losing custom code during updates:
-use a child theme for theme-related changes.
– create a custom plugin for functionality changes.
– use hooks (actions/filters) to modify plugins without editing them.
– avoid editing core or plugin files directly.
Unfortunately, most of the time when a plugin is modified directly in the code, the only solution is to make the changes in the plugin again when updating.
Hi,
You can set and get the child theme using this guide https://forum.tagdiv.com/the-child-theme-support-tutorial/
Thank you!
Thanks this link is useful.
To make sure I have a proper understanding, If I install the child theme, do I need to install the child theme on all of these: single Templates + Modules + Headers + Blocks + Category template + Category top post style + Footer template ? As explained in this page https://forum.tagdiv.com/the-child-theme-support-tutorial/
If the plugin that we customized is the optin builder, is it related to child theme to install so that if I update the newspaper template, I don’t loose everytime all the code?
Maybe can I share with you the credentials of my website so you have a look at the customization done on the plugin optin builder and you tell me if child theme solves the issue of newspaper template update?
Thanks for your help.
Lamiaa
Hi,
The child theme can be sued for the templates and code that is coming from tagDiv standard Pack, if is related to td composer, opt-in builder, or cloud, those have no support in the child theme, only if it is custom integrate or an extra plugin is created to overwrite the settings form the plugin.
Related to your customization code, I can take a look over it, but you’ll need a developer, only a developer can let you know if the code is ok or were needs to be improved.
Thank you!
