Child Theme Setup Problems
Tagged: cearti theme, child theme
- This topic has 5 replies, 2 voices, and was last updated 10 years, 6 months ago by
Jay.
-
AuthorPosts
-
December 14, 2011 at 1:57 pm #1332
Jay
Participanton this site, I have a theme called Cearti installed. I tried to create a child theme setup and it doesnt seem to be overriding the parent theme.
If I firebug the homepage, and click on the CSS tab, it shows the following:
`@import “http://dev.uniquerefinishing.net/wp-content/themes/Cearti/css/style.css”;
@import “http://dev.uniquerefinishing.net/wp-content/themes/Cearti/css/nivo-slider.css”;
@import “http://dev.uniquerefinishing.net/wp-content/themes/Cearti/css/orange.css”;
@import “http://dev.uniquerefinishing.net/wp-content/themes/Cearti/prettyPhoto/css/prettyPhoto.css”;`So I want to override the /Cearti/css/style.css and the /Cearti/css/orange.css files.
So I created, and activated, a Ceartichild theme and in there I have these files:
/themes/Ceartichild/style.css (here’s the code)
/themes/Ceartichild/css/orange.css (here’s the code)Please advise why the child theme style files are not overriding the parent theme. Thanks in advance.
December 14, 2011 at 2:38 pm #2291Steve
KeymasterIt’s probably because your’re @importing the css.
-remove the import statements from
-add the last three import statements to style.css
-add whichever ones you want to the child style.cssDecember 14, 2011 at 3:08 pm #2292Jay
ParticipantI’m a little confused. I think something got cutoff there, especially in the first bullet point.
bullet 1: remove the import statements from which file(s)? both my child styles?
bullet 2: add the last three important statements to the CHILD style.css at /Ceartichild/style.css?
bullet 3: huh? 🙂 shouldnt i only be adding certain ones?
please advise. thanks!
also, there’s a third file at http://dev.uniquerefinishing.net/wp-content/themes/Cearti/css/style.css which i’m trying to overrid with a file at http://dev.uniquerefinishing.net/wp-content/themes/Ceartichild/css/style.css
December 14, 2011 at 3:12 pm #2293Steve
KeymasterThe import statements are in your header.php file… they need to be removed from there.
December 14, 2011 at 3:17 pm #2294Jay
Participanthere’s the header.php style info: http://pastebin.com/DnUnX4Pm
if i understand, i need to change that first import rule? if so, to what?
December 14, 2011 at 10:06 pm #2295Jay
Participantgot it figured out. the /Ceartichild/style.css didnt need any import rules. That’s just used to trigger the child theme functionality.
all my new css rules should go in /Ceartichild/css/orange.css and I needed to add this to my header.php: `@import url(/wp-content/themes/Ceartichild/css/orange.css);`
thanks!
-
AuthorPosts
- You must be logged in to reply to this topic.