- This topic has 3 replies, 2 voices, and was last updated 3 years, 3 months ago by
Ying.
-
AuthorPosts
-
January 12, 2023 at 10:47 am #2493264
Madison
I am new to wordpress development and did not realize that I would lose my custom css when/if the parent theme updates.
I need to take all of my customizer changes, as well as my custom css and put it into a child theme. How can I go about this? I already downloaded the starter child theme from the generatepress website. What folder do I put the custom CSS into? There is a ‘Stylesheet’ as a main folder, and also a ‘style.css’ in the CSS folder that is in the “Assets” parent folder, and also there is an ‘all.css’ folder.
For the customizer, I can just export the customizer settings with the built in generatepress exporter and then re-import it, correct? And then just put the custom CSS in the correct folder of the child theme? Just want to make sure I am going about this the right way. So the steps are:
———————————————————————————————————————————————–
1) copy all custom css and save it somewhere. Export customizer settings and save it as well. (do I also need to copy and save any pages/media? are these saved through generatepress, or are they saved through the wordpress apache/nginx server, and therefore they’ll still appear in any location they are edited in the new child theme as long as the URL’s remain the same.)2) delete generatepress theme/plugin
3) re-install generatepress using child theme
4) add custom css into correct folder (stylesheet.css? style.css? all.css? a different one?), and then import customizer settings. (And potentially re-import pages/media as well?)
———————————————————————————————————————————————–Thank you to anyone who takes the time to help me, it is much appreciated!
January 12, 2023 at 12:50 pm #2493385Ying
StaffCustomer SupportHi there,
I would lose my custom css when/if the parent theme updates.
No, you won’t, unless you store your CSS in the parent theme’s
style.cssfile.You don’t need a child theme if you just want to add some CSS, you can add CSS to customizer > additional CSS, it will not loose when the theme updates.
And if you really want to use a child theme, please try to follow this article:
https://docs.generatepress.com/article/using-child-theme/January 15, 2023 at 9:06 am #2496414Madison
Thanks!
January 15, 2023 at 1:13 pm #2496594Ying
StaffCustomer SupportNo Problem 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.