How to keep my custom theme changes after updating genesis child theme

I am using a Genesis child theme that I would like to make some custom changes to it, but would like to be able to update it when a new version comes out without loosing my edits. I am familiar with the parent-child practice, but since my theme is already a child of genesis what is the best way to approach that?

First, I tried to make a parent-child-child theme, but not only some of the markup is different, but I also lost all my widgets sections from the parent-child theme.
-created a new directory with a style.css and have this code:

/*
Theme Name: parent-child-child
Template: genesis
*/
@import url("../parent-child/style.css");)

Next, I copied all files(functions.php, Template files, other…I only kept the style.css from my first try) from my parent-child theme to my parent-child-child theme and it worked, but I am worried that the code from functions.php is going to be loaded twice and therefor slow down my website or even break it down at some point.

What would be the right way of dealing with this problem?
Thanks,
Radi

3 Answers
3

Genesis (and others like it) has always had a problem with a lack of consensus on how to cope with updates to its child themes. The simple conventional answer is that you should seldom or never update them, because it may be a very time-intensive process to avoid breaking things. StudioPress does not do auto-updates for child themes anymore, so you have to go out of your way to follow the updates, get them, and merge the changes into your existing child theme. If you do this through a git repo you can automate and manage it rather simply and well. But even if you are doing that, why make things any more difficult than necessary?

My advice:

  • DON’T try to make a grandchild theme. Nobody recommends this.
  • DON’T make m/any changes to a Genesis child theme. The fewer changes the better, preferably zero. Then you can run updates to it without worry.

  • DO all your customizations in additional CSS outside the child theme. Add it to the Customizer if you like, just back it up carefully or lock out people who you don’t want touching it.

  • DO further customizations in original plugins or snippets.
  • DO use Genesis plugins like Simple Hooks and Simple Edits.

If you are switching between parent/child themes your widget and customizer settings will not carry over between them. You need to use import/export plugins for that.

If you are making your own Genesis child:

  • DON’T use @import for your CSS.
  • DO use the enqueue method to include styles. 👈 Covered in this good tutorial on the 2017 core theme.

  • DON’T copy the parent theme’s functions.php or template files. If the same function is loaded twice it will throw a big error right away.

  • DO modify the parent theme’s functions.php with additional code in your child functions.php. This is explained in the “Using functions.php” section at the end of this excellent article. This is also an outstandlong long introduction to coding a child theme today.

Leave a Comment