- This topic has 21 replies, 9 voices, and was last updated 2 years, 6 months ago by Leo.
March 5, 2015 at 10:06 am #83016Will
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
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.
WillMarch 5, 2015 at 10:09 am #83020TomLead DeveloperLead Developer
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 🙂May 19, 2016 at 10:07 am #195392Sam
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 replyMay 19, 2016 at 2:07 pm #195438mc208
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.May 20, 2016 at 1:07 am #195480TomLead DeveloperLead 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.May 21, 2016 at 6:43 am #195651Michiel Lap
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, MichielMay 21, 2016 at 8:36 am #195674Michiel Lap
Sorry, fixed itMay 21, 2016 at 9:26 am #195686TomLead DeveloperLead DeveloperApril 26, 2017 at 2:08 pm #310687Emily
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.April 26, 2017 at 4:13 pm #310763TomLead DeveloperLead DeveloperAugust 28, 2017 at 6:42 am #374641dprophitjr
Just installed child theme. Lost all my custom settings including copyright. I own the premium version.August 28, 2017 at 8:50 am #374722LeoStaffCustomer Support
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/#importAugust 28, 2017 at 9:36 am #374773dprophitjr
All I did was download the zip listed further up in this thread by your dev.August 28, 2017 at 11:54 am #374865LeoStaffCustomer SupportAugust 28, 2017 at 11:56 am #374867dprophitjr
I’ve reverted back to main theme. I’ll try the code mods you listed first.
- You must be logged in to reply to this topic.