Tagged: x
-
AuthorPosts
-
October 24, 2016 at 11:41 am #1228555
bartondesigncoParticipantHello!
So, I’m a little late to the party, but I just learned about Child Themes.
My confusion is this. My website (bartondesign.co) is already up and running. I have modified pages and what not but always within the constraints of the theme and it’s associated plugins, aside from adding in Google analytics code. Do I still need to convert to a child theme?
And how does that work if I’ve already made changes? I just want to ensure that a child theme is what I should be doing for my theme, and if so, how can I go about making that change without losing my changes.
Thank you so much for your help 🙂
October 24, 2016 at 12:39 pm #1228638
Prasant RaiModeratorHello There,
Thanks for writing in!
If you have made any core changes in X Theme files then my recommendations would be to export those changes into child theme. Because that approach will make sure that you can make changes without affecting the original theme’s code, which makes it easy to update your parent theme without losing your changes.
https://community.theme.co/kb/how-to-setup-child-themes/
However in regards to Google Analytics you can use our Google Analytics Extension.
Thanks.
October 24, 2016 at 1:19 pm #1228707
bartondesigncoParticipantThank you so much for the speedy reply! I just realized that I have in fact been using your Google Analytics Extension, so that’s perfect.
As for the resource you directed me to — as long as I follow those steps, it should save all the changes I made, right?
Thank you so much 🙂
October 24, 2016 at 1:40 pm #1228736
Prasant RaiModeratorHello There,
Thanks for updating the thread!
Yes, i recommend you to please walk-through our child theme setup guide and export any core changes that you might have made into child theme. Once that is done you won’t lose any of the modifications while updating X.
Thanks.
October 24, 2016 at 1:50 pm #1228744
bartondesigncoParticipantPerfect! Thanks again, have a great day 🙂
October 24, 2016 at 1:54 pm #1228754
Prasant RaiModeratorYou are most welcome. 🙂
October 24, 2016 at 8:53 pm #1229206
bartondesigncoParticipantSorry to pop back in – is there a more beginner friendly (i.e. step by step) guide for making these updates?
So basically:
1) How to create a child theme (I think I understand this part at least, lol)
2) How to figure out what changes I made to the parent theme (I didn’t manually change the code, but I used Cornerstone so that probably has the same effect, right?) and how to move them to the child theme so that my website keeps it’s look/text/features.
3) Do changes have to be made to the parent theme to revert the changes that should then have been moved to the child theme? Or do you just wait for the next update to clear those changes?
I’m just not that familiar with FTP or moving files and it’s stressing me out to think that my website could be reset if an update happens. I understand the concept of parent/child theme better after all this reading, I just need a more step-by-step guide instead of a more broad, general process to follow. And I will definitely remember to use child themes moving forward!
Thanks again for your help 🙂
October 24, 2016 at 8:57 pm #1229210
bartondesigncoParticipantFor example:
“Setting up a child theme actually takes a little bit of work as you need to create a new directory for the child theme, specify the parent theme so WordPress knows where to apply the new changes, enqueue the parent theme’s main CSS file, et cetera. You might also want to setup a functions.php file for various pieces of functionality that you want to add or modify. Fortunately, we’ve done all the heavy lifting for you in this area and all you need to do is use our provided child theme, which requires none of the setup listed above.”
Does this mean that if I install a child theme, when I want to make style changes with Cornerstone that I have to instead manually code them into function.php or something? What kind of changes would require functions.php?
October 24, 2016 at 9:48 pm #1229228
bartondesigncoParticipantJust another update: I went into my FTP and found the themes, found x-theme and the last modification was on October 6th when I did the last x theme update. I didn’t even know about child themes at the time, and I didn’t lose anything, does this mean I’m okay/don’t need to pursue a child theme, or should I anyways? I noticed there is a new x theme update since then so I don’t know if I should just install it, or follow this through and create a child theme.
Thanks again!
October 25, 2016 at 3:43 am #1229508
FriechModeratorHi There,
#1 You don’t need to create a child theme, we provide you that here, please download the x-child.zip file and install that like a standard theme.
#2 How to figure out what changes I made to the parent theme
Sorry but you or your developer only can answered that. But base on your post you seems did not do anything on the parent x|theme files.
I didn’t manually change the code, but I used Cornerstone so that probably has the same effect, right?
No, that is different. Editing a files on parent x|theme and editing a page in Cornerstone is not the same. If you edit a files on the parent X|Theme it will be overwritten when the themes update, that means you will lose the edits you made on that file. So that’s where the child themes comes in.
The page you made or edit in Cornerstone is always safe from theme or plugin updates.
how to move them to the child theme so that my website keeps it’s look/text/features.
When you want to modify a files from the parent x|theme, you need to copy this file first on the child theme in the same sub-folder directory.
For example you want to edit the file _brand.php located at \x\framework\views\global\. You need to copy that file first, and paste it on \x-child\framework\views\global, make sense?
Then do all your modification on that copied file on your child theme. That way your modified file is safe, when the parent x|theme update.
#3 Just update your parent X|Theme and all the changes you made on that parent theme will be gone.
You can also read this posts to know more about child theme:
– https://community.theme.co/forums/topic/child-parent-theme-basics/#post-140278
Hope this shed some lights.
Cheers!
October 25, 2016 at 10:07 am #1229944
bartondesigncoParticipantThank you so much – this was just what I was looking for.
October 25, 2016 at 10:53 am #1230026
Prasant RaiModeratorYou are most welcome. 🙂
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1228555 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
