Site logo

[Resolved] How can I port all customizer changes and custom CSS into child theme?

Home Forums Support [Resolved] How can I port all customizer changes and custom CSS into child theme?

Home Forums Support How can I port all customizer changes and custom CSS into child theme?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #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!

    #2493385
    Ying
    Staff
    Customer Support

    Hi 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.css file.

    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/

    #2496414
    Madison

    Thanks!

    #2496594
    Ying
    Staff
    Customer Support

    No Problem 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.