Community Forums › Forums › Archived Forums › General Discussion › Alter child theme or child of child theme?
Tagged: child themes
- This topic has 5 replies, 2 voices, and was last updated 10 years, 2 months ago by
Ben Siegfried.
-
AuthorPosts
-
July 19, 2013 at 1:34 pm #51480
Ben Siegfried
MemberSo far with Genesis I've only edited child themes. I grasp the important of child themes. Is it better practice to just alter the child theme or create a child of a child theme and work from that when working in Genesis? Would love to hear your thoughts on this.
July 19, 2013 at 2:29 pm #51490David Chu
ParticipantGood question. I have seen discussions of grandchild themes. As I recall, the upshot was that yes, that may actually work. (I've not tried it).
To me, that's too complicated. Keeping track of file paths sounds pretty wacky, for one. It IS a good idea to consider how themes are updated, though. Not all themes I make are custom, some that I work on are stock Studiopress themes. And when I work on those, I like to make it so that if the client grabs an update of, say, Metro without checking with me first, they will not eliminate all the nice changes we made to it.
One approach is that I break my custom CSS and custom functions into separate files, and use 1 require statement to pull in the custom functions, which in turn loads my custom CSS. Very clean. So if they blast my functions.php, I just add back the 1-liner.
Now I'm beginning to abstract my stuff even more by using a plugin to handle all my custom functions, and that also can be used to load custom CSS.
One can also use plugins to add custom CSS unobtrusively - even Jetpack is doing that now. (I don't use it, because it's too much of a big pig, and it phones home, but there are other plugins for that, too).
Probably a longer answer than you bargained for. 🙂 I'd be interested in hearing how you make out if you use grandchild themes.
Cheers, Dave
Dave Chu · Custom WordPress Developer – likes collaborating with Designers
July 19, 2013 at 2:52 pm #51494Ben Siegfried
MemberNo, it's not long, I love the answer! I'm curious as to how you are having functions and CSS separate from the child theme without using a grandchild. How are you doing that?
I've only been told that Genesis doesn't update their child themes and haven't experienced one being updated yet, but do they, and will they? If not, then my question isn't much of a concern because I always keep a current full backup of each site I create so I could re-install right away with minimal loss to any database updates (blog posts/comments). I use Backup Buddy, I think it's great. I also keep a copy of the style.css on my computer.
July 19, 2013 at 3:21 pm #51501David Chu
ParticipantStudiopress absolutely updates their child themes (not a lot, but now and then). They just don't show up in your automated update notice in WordPress admin. You have to go to the download area of your account and get them. Other theme companies are more active in letting you know - I'm not sure why they don't email you or maybe make a blog announcement.
My approach for upgrade-proofing is exactly as I've described it above, and if that was too technical, I'm afraid you'll need to read up on WordPress theme development more. Here are some basics.
This may obviate the whole discussion: if you make no code changes to your Studiopress child theme, then updating should be safe anyway! Backup buddy is certainly a good thing to use. But here's a scenario - let's say someone has custom work done to Metro. And then they update the child theme, and it now looks funny - custom work all gone! So they restore the site from Backup Buddy, and it's like it was before. But now you're still left with the problem of how to update AND retain the custom work, unless you have help from a geek like me.
Dave
Dave Chu · Custom WordPress Developer – likes collaborating with Designers
July 19, 2013 at 3:28 pm #51503Ben Siegfried
MemberGot it. Any clues or links you have to share about how I can learn about what you are doing would be helpful and appreciated! Thanks for the feedback!
July 19, 2013 at 4:41 pm #51518Ben Siegfried
MemberI know about that "basics" link you shared. I'd like to know how you are using require statements to add your CSS and functions.php files (that are outside of your child theme folder) into the child theme. I know how to do php includes which are similar to require statements as I have just learned. Are you implementing your require statements in a similar manner by putting a CSS and Functions file into a folder outside of the child theme folder and then requiring they load into the child theme via the theme's functions.php file?
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.