• So I just created a new child-theme using the 2011 theme for my website and I followed the following steps.

    I created a file ‘style.css’ in the child theme and entered the following:

    /*
    Theme Name:     Twenty Eleven Child
    Theme URI:      http://www.mindfulchamber.com/
    Description:    Child theme for the Twenty Eleven theme
    Author:         Shruthi Mudireddy
    Template:       twentyeleven
    Version:        0.1.0
    */
    
    @import url("../twentyeleven/style.css");

    Despite this, my website has not imported any style from the parent theme. I have tried everything. Help would be much appreciated.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    can you show us a page with the issue?

    Thread Starter shruthim

    (@shruthim)

    the Theme URI: http://www.mindfulchamber.com

    I’m new to web design. Thanks for your help

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    I’m not sure what you mean by the CSS not being imported from the parent theme. If this was the case then your website would not have any styling.

    Thread Starter shruthim

    (@shruthim)

    I mean the @import url.. should import the styling from the original 2011 theme right.

    Let me revert my website to the original 2011 theme and not the child theme. Please have a look now and I hope you get what I’m saying

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    What makes you think that the CSS is not being imported? I couldn’t see the issue when your Child Theme was active.

    Thread Starter shruthim

    (@shruthim)

    I mean to say.. when you open mindfulchamber.com
    it appears without any styling as though it were written in a MS Word document. Please have a look.. Hope you understand what I’m saying.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    What is the name of your parent theme? I just checked your site and the parent theme was ‘baskerville’, not ‘twentyeleven’. So importing the ‘twentyeleven’ styles wouldn’t work.

    Thread Starter shruthim

    (@shruthim)

    I thought it was a problem with twentyeleven. So I tried out with another theme baskerville and created it’s child theme as baskerville-child. But the same problem persists. The style doesn’t get inherited.

    Thread Starter shruthim

    (@shruthim)

    I used another function instead of @import. Apparently, it’s not the best practice. It got fixed.

    Thank you so much. And I’m sticking to Baskerville. I don’t know if using the default 2012, 2013 themes is a good choice? What is your recommendation for the theme?

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Child theme CSS not importing from Parent theme’ is closed to new replies.