Community Forums › Forums › Archived Forums › Design Tips and Tricks › Child themes of StudioPress Themes
Tagged: child themes, childthemes, themes
- This topic has 6 replies, 3 voices, and was last updated 8 years, 10 months ago by
Tim Squires.
-
AuthorPosts
-
January 17, 2015 at 9:03 pm #137823
rdr
ParticipantHi 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.
-- Robert
January 17, 2015 at 10:24 pm #137826Ren Ventura
MemberYes, 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.
Web & Software Developer & Blogger | RenVentura.com | Follow Me on Twitter @CLE_Ren
January 17, 2015 at 10:37 pm #137827rdr
ParticipantThanks 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.
-- Robert
January 17, 2015 at 11:44 pm #137830Ren Ventura
MemberYou 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).
Web & Software Developer & Blogger | RenVentura.com | Follow Me on Twitter @CLE_Ren
January 20, 2015 at 11:05 pm #138160Tim Squires
MemberHi,
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 #138166Ren Ventura
MemberHey 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.
Web & Software Developer & Blogger | RenVentura.com | Follow Me on Twitter @CLE_Ren
January 21, 2015 at 3:50 am #138167Tim Squires
MemberThanks Ren, that's really interesting to know and will stay tuned to your blog in case you experiment further and write a post
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.