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 trialhankamamut
3,177 Pointsparent customization gone?
I customized the Sense Lite theme's webpages. Then I added the child theme - I have the screenshot.png and the style.css in the child folder. When I activate the child theme it shows the vanilla theme, the changes I made to the original theme are not there. Is there a way to copy the parent changes to the child if they were done through the webpage? In my mind it can easily happen that one starts customizing a theme and later decides to add a child theme. Is this a wrong assumption? Is it a good practice to create a child theme and start customizing the child theme instead of the original theme?
2 Answers
John Halbert
12,922 PointsIt's always advisable to only makes changes to the child theme, as theme updates will wipe out any progress you have made to your base theme.
From the Codex on Child Themes:
Why use a Child Theme? There are a few reasons why you would want to use a child theme:
- If you modify a theme directly and it is updated, then your modifications may be lost. By using a child theme you will ensure that your modifications are preserved.
- Using a child theme can speed up development time.
- Using a child theme is a great way to learn about WordPress theme development.
Travis Lima
15,877 PointsBest practice is definitely to go the "Child Theme" route, as John said if a Theme updates, you are likely to loose your customization. What you can try, is to ask your hosting provider to restore your site to a slightly older version of your site. They might be able to restore your site to a version before it was backed up. Copy the code onto your machine, create a child theme, reintegrate code and update.
Hope this helps, Trav