[Resolved] How do you make a child theme?

Home Forums Support [Resolved] How do you make a child theme?

Home Forums Support How do you make a child theme?

  • This topic has 21 replies, 9 voices, and was last updated 6 years ago by Leo.
Viewing 15 posts - 1 through 15 (of 22 total)
  • Author
    Posts
  • #83016
    Will

    Hi Tom,

    I want to make my own child theme of the basic GeneratePress theme. I came across a recent post where you said

    >>>>>>>>>>>>>
    December 18, 2014 at 12:50 am
    Hi Pete,
    Not sure a plugin is really needed – it’s super easy to create a child theme.
    Here’s some instructions: http://codex.wordpress.org/Child_Themes
    Basically, you need a new folder with a style.css file, which includes the information shown in the article above.
    The only thing that you need to change is the “Template” name – which should be “generatepress”.
    Then you’ll see your new theme appear in the Dashboard, and you can activate it.
    >>>>>>>>>>>>>

    When I look at that page in the Codex, there are additional instructions for enqueueing the parent and child theme stylesheets, by adding “wp_enqueue_scripts action and use wp_enqueue_style() in your child theme’s functions.php.”

    When I look at your child theme zip file, the functions.php file is empty.

    Do we need to add this Codex code to the functions.php file?

    Or is all of this taken care of somewhere else in the GP theme already? I’ve done it before using @import, but I understand that is not the preferred method anymore.

    Will

    #83020
    Tom
    Lead Developer
    Lead Developer

    Hi Will,

    No need to enqueue or @import anything – GP does it for you.

    Here’s a super basic child theme: http://generatepress.com/api/themes/generatepress_child.zip

    Let me know if you have any questions 🙂

    #195392
    Sam

    I download the child theme this means I install it and make changes I want to the child theme?
    adn every time update the theme the change of my child theme will remain thank you for you reply

    #195438
    mc208

    I just posted in another thread about a child theme, and then I saw this after. You can delete my other post. I downloaded your zip file. Is the underscore ok or does it have to be a hypen? One other question – If I’m using your Simple CSS plugin, do those changes carry over to the child theme? In other words, I was not using a child theme before, but I was using that plugin. Now that I have the child activated, can I continue using the Simple CSS plugin? I like using the plugin more than the editor because of the syntax color stuff, makes it easier to see.

    #195480
    Tom
    Lead Developer
    Lead Developer

    Sam – that’s correct, the child theme is good for adding custom CSS or PHP, or even adding page templates. Your customizer options will stay regardless of using a child theme or not.

    Michael – The underscore is fine. Simple CSS will keep all of your CSS through all the updates. It’s an alternative to a child theme if you’re only adding CSS.

    #195651
    Michiel Lap

    Hi Tom,

    I used the two files style.css and functions.php of your zip file http://generatepress.com/api/themes/generatepress_child.zip
    I saved them to a theme folder /generatepress-child
    Then activated the theme and the header dissapeared.
    Do you know how I correct it?

    Thanks, Michiel

    #195674
    Michiel Lap

    Sorry, fixed it

    #195686
    Tom
    Lead Developer
    Lead Developer

    Awesome 🙂

    #310687
    Emily

    Just FYI I love your theme, we use it as the base for all of our sites, you give great support, and your profile pic with your tiny adorable human is just too much. Thanks for everything.

    #310763
    Tom
    Lead Developer
    Lead Developer

    Thank you! Really appreciate that 🙂

    #374641
    dprophitjr

    Just installed child theme. Lost all my custom settings including copyright. I own the premium version.

    #374722
    Leo
    Staff
    Customer Support

    Hi there,

    So you download and installed a child theme here: https://docs.generatepress.com/article/using-child-theme/

    and lost all the customizer setting?

    Make sure this line is not added: https://docs.generatepress.com/article/child-theme-issues/#import

    #374773
    dprophitjr

    All I did was download the zip listed further up in this thread by your dev.

    #374865
    Leo
    Staff
    Customer Support

    Can you link us to your site?

    Thanks!

    #374867
    dprophitjr

    I’ve reverted back to main theme. I’ll try the code mods you listed first.

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