Child Themes – Need Clarification
AnonymousJuly 10, 2012 at 7:44 pm #5045
I have been reading through the posts on how to setup a child theme and have accomplished that part. I get the child is importing the parent first and any customization in the child theme will override those. What I am not sure about is the Graphene options tab is still available in the child theme. So for example if I change colors, page layouts, add social media buttons in the child theme, does this get overwritten on updates.
In a nutshell, I think my question is do I have to do all changes as css edits in the childs style.css? Or are all or some elements in the childs graphene options that I can change and will not be overwritten? I’m am asking because I don’t have a lot of css knowledge and hoping I can avoid having to do a lot of them.
Graphene loads style sheets in this order:
Graphene parent style sheet
Graphene child theme style sheet
Graphene options styles
Graphene custom CSS
The child theme overrides the parent style sheet, as you correctly stated. If you change the color of the text via a child theme, that is the color you will see.
However, because the options styles are loaded after the child theme style sheet, any settings you have there will override whatever you have in the child theme stylesheet.
I find it easier, therefore, to simply make all of my changes via a child theme stylesheet. Additionally, the options styles and custom css get added as an internal style sheet, so if you have made a lot of changes that way, they do add the the size of your files and can have a small (but significant) affect on page load time. On the other hand, a style sheet gets loaded once, and improves page load times.
As well, because all of your changes are in one place, it’s easy to go back and change things when you later want to (and you will).
AnonymousJuly 10, 2012 at 8:59 pm #30430
Thank you for the quick response! One other question, does adding social media buttons belong in style.css or do I have to create a functions.php and add it there?Mod
What kind of social media buttons?
You can add links to your Facebook, Twitter, and other accounts through Graphene’s options:
Graphene Options >> General Options >> Top Bar Options >> “Social Media”
If you mean social sharing buttons that allow readers to share your posts, Graphene has an option for that, as well:
Graphene Options >> General Options >> Social Sharing Buttons
You can combine the latter with Graphene action hook widget areas. Here’s what I did:
AnonymousJuly 10, 2012 at 9:34 pm #30432
I guess I am confused from all the posts in child theme topic. So I’ll rephrase my question.
If I only use the Graphene options (since the changes I need are already in the options) will any future updates affect what I have set in this option area? The reason I’m asking is when I tweaked the colors in the preset “Curiosity Killed” template and then switched to another pre-installed color setting when I went back to curiosity killed all the changes I made werereset. Is there a way to upload or save changes to the color presets without css?
Thanks KennethAdminQuote:If I only use the Graphene options (since the changes I need are already in the options) will any future updates affect what I have set in this option area?
No. Those options are stored in the database, so they are not affected by updates. Exceptions are when we have to update the database structure to accommodate new features, but we always try to preserve your options in that case.Quote:The reason I’m asking is when I tweaked the colors in the preset “Curiosity Killed” template and then switched to another pre-installed color setting when I went back to curiosity killed all the changes I made werereset.
There’s no capability to modify or add new colour presets at the moment. When you select a colour preset, make changes to the colour, and save the options, those colour settings are not mapped to the colour preset. This is why when you select the colour preset again, all the modifications you made to the colours are reset to the colours defined for that colour preset.
AnonymousJuly 10, 2012 at 9:54 pm #30434
Thanks Syahir that really helps me out. I hope in future releases this my be a featured that is updated to do so. Love the theme!
- You must be logged in to reply to this topic.