Tagged: x
-
AuthorPosts
-
March 24, 2016 at 7:13 am #850955
Hello!
I am using a child theme of Ethos – this is my first time using a child theme and I’m suddenly concerned that maybe I’ve missed a step relating to views…What I did do was download the child theme and then edit it in Cornerstone, but I didnt copy any views. Did I miss a step? I am trying to paste something into the header tag for a Healcode widget which is when I became confused! Some guidance would be really appreciated.
Thanks!
March 24, 2016 at 7:14 am #850956This reply has been marked as private.March 24, 2016 at 7:27 am #850977Hey there,
Please see https://community.theme.co/kb/customization-best-practices/ to learn how to customize X.
Thanks.
March 24, 2016 at 7:43 am #850987Hi,
Thanks for your quick reply! Thats actually the article that got me confused in the first place.
Originally I had followed these steps: https://community.theme.co/kb/how-to-setup-child-themes/ and thought that was sufficient but when I read the second article (the one you just recommended) I started to feel unsure that I had done all the necessary work.
Could you please clarify? the first article makes it sound as if I dont need to do anything with views…
Thanks for all your help!
March 24, 2016 at 8:02 am #851007Hi Jaspah,
Thanks for writing back!
Please install the child theme as it is. Do not delete any file or folder from it. Then, if you want to copy a template file from the parent theme, just copy that to the same level of the directory inside the child theme. So let’s say you want to copy a file from the parent theme located under framework/views/integrity/, you need to copy it to the same level of directories in your child theme, i.e., framework/views/integrity/.
It might be confusing for you if you are not a developer. Child theme customization is best to be made by developers. However, if you can give us more detail on what is it that you want to achieve with the child theme, we’ll be happy to point you in the right direction. Please note that, if it is a custom development, we cannot provide that, and you’ll need to consult a developer to assist you with the custom development.
Thank you!
March 24, 2016 at 8:34 am #851035Thanks so much for your clarification.
I decided to use a child theme because I was adding a fair amount of CSS and was recommended to use the child theme so nothing was lost in a future update.
I installed the child theme (as you lay out so clearly in the article) and activated it. I also exported and then imported my x customizer settings like I was prompted to.
Then I continued to edit the child theme just like I was when I was using the parent theme – in cornerstone, mainly using the already made elements but sometimes adding CSS changes where I wanted them.
Then I went to use a 3rd party plugin (Healcode) that directed me to put something in the header tag of each page in order to function properly. When I began researching how to find the header.php file I started to get confused as I had never copied over those files to the child theme.
So, my two questions are:
Can I continue as I have been, just editing the child theme in cornerstone and adding my CSS when needed or did I miss a necessary step by not copying the template files from the parent theme? (I’m hoping copying the files is only necessary to change more complex things that I am not wanting to do)
If I’m on the right track (and I dont need to copy the files, I can just use the child theme as is) than how do I insert a piece of code into the “Head Tag” of a page (Healcode says I can paste it anywhere on the page but the preferred place is the head tag)
Thanks again!
March 24, 2016 at 12:33 pm #851255Hi Jaspah,
The first thing you can use the child theme for is to add some custom CSS. Custom CSS can be added in the customizer as well but it would be better to place them in the style.css file of the child theme.
There is another file where you can use to add some further customizations which is the functions.php file which is also included in the child theme. You can read more about this file here.
We can use the functions.php file to add a code in the head tag. You can try this:
add_action('wp_head', 'your_function'); function your_function() { ?> <!-- Your code here --> <?php }
Please feel free to ask if you have further questions.
March 24, 2016 at 4:24 pm #851591Hi,
Thanks so much for your help! I just want to confirm one last time that I can use the childs theme as is without copying/customizing views?
Thanks!
March 24, 2016 at 4:36 pm #851605Also, for page specific css changes is it okay to do that under page settings in cornerstone? Thats we’re I’ve been making the changes, as I have very few global changes I need to make.
Thanks!
March 24, 2016 at 8:29 pm #851822Hello There,
Yes you are correct. A child theme is a must if you are customizing X theme. Having a child theme could allow you to add custom functions and css. If you do not have any custom template or views, it would be fine. For page specific css, Adding your page specific css in your child theme’s style.css could decrease page loading performance thus I would highly recommend to add it in the settings tab, Settings > Custom CSS in Cornerstone. This helps a lot for faster page loading.
Hope this helps.
-
AuthorPosts