Hi,
I’ve read a few documents but didn’t understand some points. So I open this thread to ask:
1. If I want to custom header, just copy some files that belong to header and paste in the child theme folder and then active the child them, right?
2. If the question #1 is right, then in the future, there is a new update for these files, do I need to update the files on child theme? Basically, when I copy, they are the same, but after updating the new version, the files of the main theme are different with the child theme.
I’m sorry if my sentences aren’t clear. For example: I want to add a custom_ads in the header. According to what I have read from here: https://forum.tagdiv.com/the-child-theme-support-tutorial/, I need to create a new folder Newspaper-child and copy header.php into it. And then paste the customization code in here.
Right?
The question is, when any new update come and need to change header.php, do I need to update the header.php in the child theme too?
Is there any solution to customize the theme and don’t need to worry about update overwrite?
Thank you.
Hello anhbloginc,
Please notice that all the modification wich you have done in your child theme, on the next update, the code will be overwritten. All of the files which you have in your child theme will be changed in the new update, you have to replace it with the updated file and you have to start again to configure it.
Thank you for the message!
Is there any solution to customize the theme and don’t need to worry about update overwrite?
Hello anhbloginc,
Please notice that if your customized files from your child theme are changed in the update, all the information/customization from these kinds of files will be overwritten. Before doing the update, you have to check the changelog and see how files were changed in the update and you can replace it only these files. If your changed files were changed in the update, unfortunately, you will have to re-customize again after doing the update.
Thank you for your understanding!
So, what’s purpose of child theme? In many other WordPress themes, it use to do customization. When a new update come, just need to update the main theme.
Hello anhbloginc,
The child theme is most useful when you want to do some additional customizations in theme. The idea of creating a theme right after you’ve just purchased one that you like might seem a little weird. However, when using a child theme you can make changes to the theme without altering the original theme’s code. If you create a child theme you’ll make a completely different set of files that you’ll use without ever having to touch the original theme. This will make it so much easier when it’s time to update and it will make it so that you don’t accidentally damage the original theme. Also, if you mess up the child theme you can just revert back to the original, or parent, theme. It’s most useful to use a child theme when you’re customizing a theme. Most of the themes that WordPress offers for free, like their twentysomething series, are simple. With a few adjustments they can fit your purpose, much better. If you use a child theme, you’ll easily be able to revert back to the original theme if you make a mistake, or even if you just want to change something back to the way it originally was. Some themes aren’t really meant to be customized, since they’re purchased for a specific reason.
Thank you for your understanding!