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! While you're at it, check out some resources Treehouse students have shared here.
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 trialNika Lea Erwin
2,754 PointsIf the parent theme is later updated by the original developer, is it likely they will update its .php files too?
And what happens then if, as in the example, I've copied page.php over to my child theme, and modified it? Is it likely to override any relevant future updates?
Nika Lea Erwin
2,754 PointsThank you Gary. It looks like you posted this as a Comment rather than an Answer? So I'm not able to select your answer as helpful. So let's say the developer of the parent theme may be making changes that I want, to the PHP files - would it make sense to periodically go and check how the files are different? And then copy the changes over to the files in my child folder? Or how else would I keep track?
1 Answer
Gary Stewart
14,142 PointsHi Nika,
Regarding the parent theme, yes there is the possibility that a developer may have changed php files within a theme when they release an update.
As you have made a child theme then yes all files which you have copied and modified within the child theme will override the same file of that within the parent theme. So if you have your own custom page.php within your child theme and the original developer modifies the same file in a parent theme update then yours will still be used first.
In response to your second question, yes you would have to monitor the differences and then make the relevant changes to your child theme copies. Developers tend to put what they have changed in the update changelog notes which may help.
Thanks Gary
Gary Stewart
14,142 PointsGary Stewart
14,142 PointsHi Nika,
Regarding the parent theme, yes there is the possibility that a developer may have changed php files within a theme when they release an update.
As you have made a child theme then yes all files which you have copied and modified within the child theme will override the same file of that within the parent theme. So if you have your own custom page.php within your child theme and the original developer modifies the same file in a parent theme update then yours will still be used first.
Thanks Gary