Group Admins

  • Profile picture of Steve

Themes

Public Group active 4 years, 8 months ago ago

Q + A about theme design for Wordpress

Child Theme Setup Problems

This topic contains 0 replies, has 2 voices, and was last updated by  Jay 7 years, 2 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1332

    Jay
    Participant

    on 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.

    #2291

    Steve
    Keymaster

    It’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.css

    #2292

    Jay
    Participant

    I’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

    #2293

    Steve
    Keymaster

    The import statements are in your header.php file… they need to be removed from there.

    #2294

    Jay
    Participant

    here’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?

    #2295

    Jay
    Participant

    got 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!

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.