Moving Hueman custom.css to Childify Me?
-
Hi, Rocco.
I already have a custom.css file I’ve been using in my Hueman theme. Due to the new Customizer updates, can I copy and paste the contents of that file somewhere in the Childify Me plugin, to save me making all those changes all over all again? (I’ve changed font sizes, colour, weights, margins, etc)
And if so, should I only copy the bits I’ve added, or copy and paste the entire custom.css file into a Childify Me file?
Thank you!
- This topic was modified 8 years, 1 month ago by Kerrie Redgate.
-
Hi Kerrie.
I’m not totally sure what you mean ??
This plugin doesn just the following:
1) creates a directory with a specified name
2) creates a functions.php file in it with the php start tag <?php and a comment line
3) creates a style.css which points to the parent theme (Template attribute)
Once done, this plugin doesn’t do anything more, you can even disable it.
So it doesn’t have “its” files.
But maybe you’re referring to the child-theme style.css it creates?Yeah basically you can move the relevant CSS code you want in the child-theme style.css.
Does this solve your doubt?
Sorry if I didn’t understand …Bests ??
Rocco
Thanks so much, Rocco!
Yes, that’s great. I just didn’t want to have to do all that styling all over again. So if I can paste my custom.css from Hueman into the child-theme style.css created via the Childify Me plugin, that sounds like it will do the trick!
I was worried about activating the Childify Me plugin in case I lost all my styling.
I’ve been unsure about the implications of the new Customiser change in Hueman, and figured I need Childify Me to keep my styling, but wasn’t sure how it all worked.Many thanks for your swift response!
Cheers from Australia,
KerrieHello, Rocco,
I can’t find a child-theme.css file anywhere to add my original custom.css to.
In the Editor there is only a .php file.
How do I do this please? Yikes! All my customisations are GONE!!Thank you!
Sorry, Rocco, the css turned up! Maybe I hadn’t re-activated the child theme after I was trying to fix the header menu problem. Hopefully, I won’t have to bother you again!
Apologies!No problem ??
Glad you solved!Rocco
Hello Rocco,
I more or less have the same question as Kerrie. I am an utter newbie at this.
I have the old v. 2.5.5 theme and the simple custom.css plugin. I don’t expect to really need a child theme but everybody says I should make one for the latest Hueman.If I simply paste the custom.css code into the Childify Me file do I then need to delete the Simple Custom.css plugin custom.css or can they both run without conflict? I tried keeping the plugin and it did not work, the custom code effects for the sidebar disappeared.
This is what I pasted into the child theme.
.entry { color: black; } .entry.excerpt { color: black; } .entry .wp-caption { background: #ffffff; } /* */ @media only screen and (min-width: 480px) and (max-width: 1200px) { .s2-expand .s2 { background: #ffffff; } } @media only screen and (min-width: 480px) and (max-width: 960px) { .s1-expand .s1 { background: #ffffff; } } @media only screen and (max-width: 479px) { .sidebar { background: #ffffff; } } .sidebar-top p { float: left; color: #000000; font-size: 15px; font-weight: 600; text-transform: uppercase; line-height: 24px; padding: 3px 0; } .s1 .sidebar-top, .s1 .sidebar-toggle { background-color: #fff!important; }
Any help would be much appreciated.
Thanks
DanielHi Daniel,
the simple custom css should not conflict with this plugin.I have no info about hueman 2.5.5 where can I find it?
Maybe 2.2.5?What I can see is that that old hueman version loads the child-theme style.css before the theme’s reponsive css.
This means that if in the responsive css there are rules with the same specificity of the ones you used in your custom css, the latter will be “overridden” by the earlier.This means that you need stronger rules, either using !important (not suggested), or using selectors with more specificity, e.g. instead of:
.s2-expand .s2 { background: #ffffff; }
something like
body.s2-expand .s2 { background: #ffffff; }
should be enough… and so on.
Hope this helps.
Rocco
Hi Rocco,
Thank you so much for your help! I see the problem now with the old version.
Yes, I meant 2.2.5.Rather than my trying to figure the extra specificity needed for the code to work could I simply update the theme to the latest version, along with WP and plugins? Pasting in the custom code to the child before or after that? I mean would the latest version prioritize differently so I could avoid that work or would it still be necessary?
Thanks again,
Daniel
Hi,
newer hueman versions treat the child-theme style.css in a better way.
You wouldn’t need that.
Though newer hueman versions, since 3.0.0, introduced many changes, All the theme options have been ported in the customizer (Appearance -> Customize) as per wp.org theme rule.
Also, always for wp.org theme rules, some options have been moved in the hueman-addons plugin.So if you want to do the migration I, personally, suggest you to do it on a test website.
Anyway I see no reason why you shouldn’t continue to use your custom simple css plugin.
Doesn’t work?Last thing.
This very plugin just creates a child-theme. Meaning that creates a child-theme directory with a style.css (where is declared that its parent is Hueman) and an “empty” functions.php.
You don’t need to keep it active to make the child-theme work.
It just automatizes this process: https://codex.www.ads-software.com/Child_Themes#How_to_Create_a_Child_Theme
but, regarding this:
Note that the previous method was to import the parent theme stylesheet using @import: this is no longer best practice, as it increases the amount of time it takes style sheets to load.
this plugin still uses that method for the reasons you can find here:
https://www.ads-software.com/support/topic/needs-update-12/#post-8056597(n.b. since hueman 3.0 the @import statement will not be printed in the style.css at child-theme creation time, because of hueman child-theme compatibility improvements).
Best regards
Hi Rocco,
Thank you very much for your extensive reply. Yes, it was helpful but I still have the uncertainty as to what the effects would be of updating the Hueman theme.
newer hueman versions treat the child-theme style.css in a better way.
Does that mean I would not have to add specificity to the css for it to work with updated version child theme?
If I just updated the parent theme would I lose the functionality of the custom.css from the simple plugin or not? It is true that Toni, the site-owner, doesn’t really expect to want to the degree of customization in the near future that would demand a child theme but everybody but yourself says I should get one… The custom.css works fine now but I need to update the theme, as well as WordPress and plugins. A test website? Yes… that would be a safety solution. Still.. do you know what would happen if I just went ahead with updating with no child theme?
Hopefully I can resolve this by tomorrow and stop pestering you ??
Thanks in advance, Rocco. You are a star!
All the best
Hi,
Does that mean I would not have to add specificity to the css for it to work with updated version child theme?
Not necessarily, loading order is one of the things to have in mind when talking about specificity.
If I just updated the parent theme would I lose the functionality of the custom.css from the simple plugin or not?
Is this an external plugin which has nothing to do with the theme? If yes, then no you won’t lose that functionality, since it’s unrelated.
Though, moving from that old theme version to the latest one might need you to change something in CSS and not only.that would demand a child theme but everybody but yourself says I should get one…
A child-theme is needed only if you have to override parent files (commonly templates), or override functions (when the parent theme allow you to do that, read: pluggable functions). In the latter case even a plugin would do the same, as the plugins are loaded before the themes (which is what’s needed to override pluggable functions).
For all the rest it might be needed or not. It’s a choice you might want to do thinking something like “… in the future I might need it for more complex stuff…”
Or because you want to have the custom CSS in a file and not only stored in the db.Anyways you can have a child-theme for future use and still continue to use the simple css plugin.
Hope this helps.
Rocco
Hello Rocco,
Thanks again for your kind reply.
Unfortunately I took the plunge and updated everything, theme, WordPress and simple custom css plugin, no child theme active just the parent, and the code doesn’t work… as you can see the grey empty sidebar now at https://www.toniallenauthor.co.uk . Functionality lost. I have the old site and theme saved and the custom css of course… but I don’t want to go back.
So how to fix this? Does the new theme require more specificity for the custom css from the plugin? Do you think this is the only way? I am not sure about loading order.
Apologies for being a pain.
Thanks again,
Daniel
- The topic ‘Moving Hueman custom.css to Childify Me?’ is closed to new replies.