January 17, 2015 at 9:03 pm #137823rdrParticipant
Hi all. I just started using Minimum Pro and like it very much. At the same time, I've been learning about how to develop child themes so that any changes to the underlying theme isn't ruined by my fiddling.
When I try to make a child theme of a WordPress theme, everything works just fine. When I try to do the same using Minimum Pro as the parent to my theme I get, "The 'minimum-pro' theme is not a valid parent theme."
I suspect this is because Minimum Pro is, itself, a child theme of Genesis. Is this true and, if you cannot make a child theme of a StudioPress theme, could I ask for guidance as to how it's best to modify a StudioPress theme without running the risk of altering its code directly.
Hope this makes sense. Thank you so much for your thoughts.
-- RobertJanuary 17, 2015 at 10:24 pm #137826
Yes, Minimum Pro is a child theme and cannot be used as a parent theme because Genesis is required to use it. Genesis child themes are meant to be customized however you want. You don't need to worry about your customizations being overwritten because the child theme is never updated. If you find that you need to restart, you can just install a fresh copy of the child theme. That said, the only other way to customize your site would be through a plugin that contains all of your custom code. This is something I do for every site I build; I put theme-independent code (stays if the theme is switched) in a plugin and theme-dependent code (no longer applies if the theme is is changed) stays in the theme.
January 17, 2015 at 10:37 pm #137827rdrParticipant
Thanks for the quick reply, Ren. Much appreciated.
I don't exactly follow when you say, "You don’t need to worry about your customizations being overwritten because the child theme is never updated. If you find that you need to restart, you can just install a fresh copy of the child theme."
If I insert new code or changes into the Minimum Pro's style.css file, for example, and then had to reinstall Minimum Pro to start over I will, in fact, lose my changes.
I'm sure I'm misunderstanding the proper way to modify a StudioPress theme. Any guidance is very much appreciated.
-- RobertJanuary 17, 2015 at 11:44 pm #137830
You can add your customizations to a plugin but it's more efficient to customize the child theme as that's what it's for and a plugin would be overriding other things, which can get messy. But a child theme is yours to take and do with it what you want. There's nothing about that specific child theme that you need to keep (as long as it's still including the main Genesis core).
January 20, 2015 at 11:05 pm #138160Tim SquiresMember
Very interesting topic and great suggestions from Ren. Also - if the changes that you are making are only to the css file, you can document your changes with comments so that you know which areas are the ones that you have changed. You can keep a copy of the original to refer to and restore if required.
Ren - I wonder if there would be any kind of version control for this kind of thing on GitHub. Would that also be worth exploring?
January 21, 2015 at 1:52 am #138166
Hey Tim - Sure, version control for any project is always a good idea. I even like the idea of putting an entire child theme on GitHub and syncing it up with WordPress to automatically update itself. Then, you could work on it locally, push the changes to your GitHub repository and update it in WordPress. This isn't something I've done before but I might give it a shot (and maybe write a post on it). Hopefully it's as easy as I'm thinking/hoping it will be. One thing for someone to note before doing this would to make the repository private or to move any code that they don't want to be publicly available to a plugin.
For this specific case, though, even a simple gist file would work just to track changes.
January 21, 2015 at 3:50 am #138167
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.