Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.Start your free trial
Child themes in WordPress - critical theme update and change not made in child
If there is a file that has some issue and the creator (or even WordPress) updates that file, shouldn't I make that same fix to the file in my child theme? If so, how do I know I should do that. And what changes to make?
Thanks for your reply.
The class here talked about modifying header.php and footer php and that got me thinking. This sounds like a headache to have to monitor changes and make them in my version. I'm wondering how people deal with this in the real world.
I have seen something about hooks so perhaps that is a better way to go. Hopefully, those are discussed here.
Artemis Roditi1,645 Points
Have you made structural changes to your theme beyond just CSS and functions modifications? Did you modify php template files like the navigation.php or footer.php in your child theme? If yes, then it depends on the update and your modifications. If not though, you should not worry. The .php files are loaded from the parent theme (which should be available but not activated in "Administration Panels > Appearance > Themes"). So, if an update is needed, you only have to update the parent theme. That's the main purpose of using child themes: to be able to update the parent theme without losing your style modifications.
You can read more about it on wordpress codex and here
I hope this helps.