-
AuthorPosts
-
November 16, 2015 at 11:31 am #667171
Hi,
I’ve searched the forums, looked at YouTube, read documentation, and I’m sure this has been covered, but I couldn’t find it. If there’s a thread that answers my question please just slap a link on me and I’ll be cool with that…
I understand WHY one should create a child theme, I guess I’ve never been clear how to “maintain” a child theme, and all that goes with that. I want to be able to get the benefits of updates, take advantage of some out-of-the-box solutions that best practices call for a child theme on, and also avoid compatibility problems that might go with a child theme that is essentially out-of-date.
What am I missing here? I saw on one thread a suggestion to keep a backup of all custom changes that are apparently on the functions.php file. Is that something you move to your main theme’s directory after you update? Then create another child theme when there is another update? It doesn’t seem like it would be necessary to find every bit of customization and copy to some text file or whatever to then paste back in to an updated child theme. I don’t know, maybe it is? Obviously I’m not clued in to the process, but again I do understand WHY we should create and use child themes…it’s when other elements come into play that I’m fuzzy on.
After messing with endless themes and spending $$$ on premium themes/features for my small business, I love ‘X’. I really like Cornerstone too. I still have plugins and customizations I like to implement, but X has been a godsend, I just want to make sure I’m taking full advantage of all of it’s capabilities…one of those being “updated” with the latest Themeco has to offer.
I guess my bottom line question is, after creating and using a Child theme for a little while, how do I continue to use it in a way that allows me get from it what I wanted to get from X the Theme in the first place?
Thank you for reading and for responding. Always great support here!
November 16, 2015 at 12:03 pm #667219Hi there,
Thanks for writing in! It seems you are confused a bit about backup. Let me try to clear the things and keep it simple. You don’t need to update your Child Theme so it will be on it’s place for long time with all your custom codes. So you don’t necessarily keep the backups of Child Theme while updating the parent theme as you are not changing the Child Theme at all. However we always recommend to keep other settings backed like the Customizer settings and Custom CSS/JS added through Customizer.
So if you are using a Child Theme, just keep adding your custom functions to this and keep the parent theme updated. When updating parent theme, you can take backup of you Customizer for safety.
Hope this makes sense.
Cheers!
November 16, 2015 at 4:33 pm #667538Thanks for the quick reply. I appreciate it…
To follow-up what you said:
Where and how are Customizer settings and Custom CSS/JS backed up if I wanted to do that? In my public_html file directory? Is it under wp-settings.php or something? I don’t mean to bombard with questions, I would like to be clear on this though. I have no problems ever remembering to back anything up, but I’m not clear in this case what and where the files that need to be backed up are.
So according to how I read the reply post, I only use the child theme to store my customizations – in case they are overwritten on an update to the parent theme – but I am doing my “active” work still via the parent theme as that is the theme that is activated on my WordPress. Is that correct? …I’m assuming here when I say that though. How I read “So if you are using a Child Theme, just keep adding your custom functions to this and keep the parent theme updated” goes back to my earlier impression of child themes – That you do your work on an active child theme and you just update the parent theme as updates come out without using the parent theme.
Again, I’m trying to clarify, I’m not trying to be confused…I just am. :\ Please enlighten me on this, thank you!
November 16, 2015 at 10:07 pm #667806Hi There,
Let me clear this up quick and simple. Yes, your definition of Child Theme to store your customizations is correct. But the Child theme needs to be Activated so those customizations of yours takes effect.
Since you can not edit any files on the Parent theme, because as you already know any modification on parent theme will be overwritten when the updates is release. All the modification/customizations should go on the child theme.
Activating the child theme does not mean you’re not using the parent theme, all the functions (characteristic) of the parent theme are inherited by the child theme. (make sense?)
The child theme is for you to develop/expand (add new characteristics) if you need to.
You only need to update child theme, if there is a certain files in the parent theme that change (some sort of follow the leader). This isn’t very common though.
It’s not necessary to backup the Customizer settings when doing a theme update, but it is a good practice because there are things that you do not have control of. For example you might disconnected on the server in the middle of the update process, and sure that could cause a file corruption.
You can download/backup the Customizer settings; on your admin dashboard under Addons > Customizer Manager > then Export
You can backup your customizations file on your child theme, by downloading it to your local machine via FTP.
Hope this shed some lights. Let us know if there is something that is not clear.
Cheers!
November 17, 2015 at 4:52 pm #669136Thanks as always for the help and thorough explanations…
Backing up the Customizer totally makes sense and now that you mention it I remember doing that before. Appreciate that tip. 🙂
And, everything you said here makes sense 100%: “Activating the child theme does not mean you’re not using the parent theme, all the functions (characteristic) of the parent theme are inherited by the child theme.”
This is where I’m still a little confused: “You only need to update child theme, if there is a certain files in the parent theme that change (some sort of follow the leader). This isn’t very common though.”
To clarify, when X (Themeco) rolls out an update, and I click ‘update’ on my WP UI (or download and install via FTP) – and the ‘X-Child Theme’ is what is activated – the parent is updated but not the child. I understand I don’t always need to update the Child, but since the Child is my current “canvas” for working, how can I take advantage of the new (sometimes pretty awesome) features on the Child theme when a significant update is rolled out?
I hope my question makes sense. Thank you for your patience in explaining this. From all documentation and forums on the Themeco community it seems like Child Themes are stressed as very important tools and I just want to understand fully to get the most out of my experience with this awesome theme. I even called my host to ask but they obviously can’t know everything about every theme, and I think they muddied the waters for me even more. So again, thank you for your patience. There is no urgency to “solving” this for me, but I would like to learn – to help myself, and potentially others once I get the ins and outs.
Much appreciated!
November 17, 2015 at 9:11 pm #669354Hi There,
Good to see you’re determined to learn about the X|Theme. Again I’ll make this short, to explain further the updating of the child theme lets take this X|Theme 3.2.0 release as an example. If you read that log in middle part you see that on the update we’ve simplified/renamed some of our classes
(x-container-fluid is now x-container)
.That means if you have a custom template (modification) and that modification concerns the
x-container-fluid
class, then you need to edit that template and make the necessary changes (on your child theme).But we do not do that changes often, so you would end up adding custom code on your child theme often, than editing it.
If your modifications doesn’t concern the changes (in this example the x-container-fluid) then there is no need to update on the child theme.
how can I take advantage of the new (sometimes pretty awesome) features on the Child theme when a significant update is rolled out?
Like I said above all functions (including new features) of the parent them are inherited by the child theme.
Hope it helps, Cheers!
November 18, 2015 at 12:24 am #669572Okay, that is making more and more sense, and I appreciate it. I read the changelog and I see what you are saying about those specific modifications. I have one more question (I hope just one more) and I’ll feel much more enlightened about all of this assuming I’m not so far off in my thinking…
So to follow up on my question (“How can I take advantage of the new (sometimes pretty awesome) features on the Child theme when a significant update is rolled out?”) and your answer about the child inheriting new features of the parent…I’ll use the example of the rollout of Cornerstone and the features that came with, I believe, the 4.0(?) release. So if at that time I was using a child theme, when that major update was released my child theme would have also updated to include Cornerstone, etc. once I updated the parent theme?
Thanks! Appreciate the time spent explaining all of this!
November 18, 2015 at 12:50 am #669582Hi There,
Let’s not use that example because Cornerstone is a plugin, you need to install/update that separately. All features of Cornerstone can be used by parent or child theme (or any theme besides X in the future 🙂 ) as long as that plugin is active.
Lets make the X Theme 4.1.0 as an example instead. On that release we introduce Expanded Demos. If you’re using older than X Theme 4.1.0 you won’t have that feature weather you’re on a parent or a child theme, right?
But If you do update to X Theme 4.1.0 or later, then you get that feature even though you’re on the child theme.
I think you don’t need to worry much about updating your child theme, because like I said above you would often add a custom code to it, than editing. specially if you’re only adding an custom css on the child theme’s style.css file or custom functions on the functions.php file.
Hope this shed some lights.
Cheers!
November 18, 2015 at 3:08 pm #670585My bad on the Cornerstone example. Duh, yeah, it’s a plugin…haha.
Perfect example with the Expanded Demos. Makes sense.
Thank you again for your excellent support and patience. I may have further questions in the future, but I’m good for now, and I learned quite a bit from our interaction here. I am certainly grateful for the time spent walking me through my question about the Child-Parent Theme relationship.
Very very helpful! Great support!!
November 18, 2015 at 6:11 pm #670763You’re more than welcome, your satisfaction is a great compliment for us. Yes, feel free to get in touch with us regarding any further queries about the X theme.
Cheers!
November 23, 2015 at 9:55 pm #676916I just thought I’d add a few points to this (hopefully accurate ones). 🙂
Part of the confusion might be that in the Appearance menu in WordPress, it’s like you’re actually switching themes. But, I like to think of a child and parent theme more like those (now old) overhead projectors, where you could build up layers of sheets or put a blank one on top and mark it up. (The child theme is kind of like that blank top layer.)
So, when you mark up that top layer, you’re overlaying a change on the ‘parent’ which is also showing through. If someone were to swap out that ‘parent’ layer, so long as the thing you over-layed isn’t too different, it’s going to work fine, and any other changes on the parent will just become part of the new display.
Where it breaks from that analogy, is that it works a bit differently with CSS vs PHP files, and then I guess functions.php is a bit different case as well.
For CSS files, you’re typically adding to or truly overlaying. You might let the parent describe the font or size of some element, but in the child, tell it to make the text red, overlaying the original command that made it black.
So, the parent loads and says you want 12 point Sans in black, but then looks at the child and notices that it should really be red instead.
For PHP files, you’re copying over the PHP file from the parent, and that file in the child now replaces the one from the parent. You’re typically just changing the PHP code a bit to describe how to build the page, but the core calls probably work the same, even if the parent has been updated (as far as interaction in the the WordPress system).
But, as far as that particular page / feature / component is concerned, it is possible that the parent PHP file gets updated, and you’ll still be running the old child version.
For this reason, I still think it’s a good idea to keep a log of changes you’re making if you go beyond style.css or functions.php for your child theme. That way, you can see what files you’ve changed and how/why and decide if you need to grab a new copy of the parent for your child theme and re-implement the changes at some point in the future.
For functions.php, I’m not sure I completely understand yet, but it seems to be it’s own case. I think it sort of combines the parent and child? Anyway, I’m less clear on how that one works, but I guess it’s because additional functionality often gets added onto functions.php.
Hope that helps a bit more, and if I’ve err’d, it would be great if support could point that out. But, I wanted to share this because I’ve been trying to demystify child themes for myself a bit too… too often, they are written about like they are almost magic and just work… and that you just set them up, make all your mods there, and forget about them. Unfortunately, it’s not *quite* that easy. (But X sure makes it easy to set them up!!!)
November 24, 2015 at 12:24 am #677043Hello There,
Thank you for those clarification. Yes, you’re correct we can say that child theme is a top layer to customize how the page will display/behave. It will inherit all functions and design of the main X theme and top of that we can customize it to the way we want. Regarding updates, we have list every update we did in our CHANGELOG so you have clear reference on what happened before you update anything.
function.php covers the functionality on how elements and other pages is rendered too. If style.css covers the aesthetic customization, function.php is use to customize functions that describe the logic on how a specific element is displayed or when it should be displayed. It is like the brain that controls how everything will work.
Hope this helps.
-
AuthorPosts