I inherited a site that didn't use a child theme, and now it needs to be updated. Can I take the original parent theme, change the style sheet header, copy it into the root, delete everything but wp-content and make it be the child theme? In the past, I've loaded any files I wanted from the parent into the child theme, and it is my understanding that the browser will prefer whatever's in the child theme.
I inherited a site that didn't use a child theme, and now it needs to be updated. Can I take the original parent theme, change the style sheet header, copy it into the root, delete everything but wp-content and make it be the child theme? In the past, I've loaded any files I wanted from the parent into the child theme, and it is my understanding that the browser will prefer whatever's in the child theme.
Share Improve this question asked Apr 22, 2020 at 19:19 plushjudyplushjudy 211 silver badge6 bronze badges1 Answer
Reset to default -2That is 100% the approach you should take. You can even set up the child theme with a folder your-child-theme-name/
and then a style.css which uses the parent as the template:
template: your-parent-theme-folder
Then, you can either import the styles into this style.css (@import url('../parent-theme-folder/style.css')
) or start from scratch as needed.
You'll also be able to pull in files you want to edit (like header.php or footer.php).
Additional reading:
- https://www.smashingmagazine/2016/01/create-customize-wordpress-child-theme/
- https://developer.wordpress/themes/advanced-topics/child-themes/
- https://www.hostinger/tutorials/how-to-create-wordpress-child-theme