Support » Themes and Templates » Child Theme Problems importing Parent style.css

  • Resolved craignimbusits


    Hi, thanks in advance for your help.

    I’m new to WordPress and I’ve been stuck on this all afternoon. I created a Child theme for the tutorial

    Worked fine up until I added the @import url(“../twentytwelve/style.css”); it made no difference to my theme – its still has no style – its blank a part from the written content.

    I know there are lots of threads on here about this problem but the ones I’ve read don’t seem to have helped me.

    My site is
    My host is ipage

    this is my style.css file

    Theme Name: Twenty Twelve Child
    Theme URI:
    Description: Child theme for the Twenty Twelve theme
    Author: Craig W. Hunt
    Author URI:
    Template: twentytwelve
    Version: 0.1.0

    @import url(“../twentytwelve/style.css”);

    thank you for your help

Viewing 13 replies - 1 through 13 (of 13 total)
  • Do you have a copy of Twenty Twelve in your themes folder? The default Twenty Twelve and your Twenty Twelve Child Theme should reside side-by-side at /wp-content/themes/.

    Thanks for the reply.

    I have Twenty Twelve as it was when I first installed WordPress: /wp-content/themes/twentytwelve/style.css

    My child theme is /wp-content/themes/my-twentytwelve/style.css

    But I couldn’t get the @import url(“../twentytwelve/style.css”); to work

    However, in the mean time I tried to use the One Click Child Theme Plug in – I think it seems to have worked…. Although I still have the same message which is:

    This child theme requires its parent theme, Twenty Twelve.

    But the site appears as it should this time- identical to Twenty Twelve, because I’ve made no changes yet. I’m testing it now to see what happens when I make changes to the style.css file that the plugin created

    The plugin made another css file rtl.css (see below)

    Theme Name:     My twentytwelve
    Right to Left text support.
    @import url("../twentytwelve/rtl.css");

    I still feel defeated though as I followed the instructions and I still failed.

    It looks like your current child theme is working fine. The second one is for right to left languages – just delete it if it’s not relevant.

    This child theme requires its parent theme, Twenty Twelve.

    That is a normal message when all is well. Does your Child Theme name match the name of its folder? I do not remember exactly what must match where, but something like that might be the issue there.

    If you have any plugins active, try deactivating them to see if they are causing the error message.

    Ok, I’m going to bed now but in the morning I’ll delete the style.css file that the one click plugin created and create my own again and deactivate all my plugins before I do it.

    Perhaps I’ll try that too, lee. but the only difference in the folder name is there is no space betweeen twenty and tweleve I could try ‘twenty-twelve’

    Thank you both very much

    The way it’s set up now looks to be working – have you tried changing the styles in the child theme? Have a good sleep – morning often helps :).

    Thanks for your reply.

    This morning I had another go at it but this time I created a child theme for twenty eleven. It worker perfect, I changed the site name to red and it worked fine.

    So I thought I’ll try again for twenty twelve. I managed to import the parent theme this time, great I thought, but I couldn’t change the style with code. It’s probably just me – I’m new to wordpress and writing code (or copying other peoples because I can’t write my own).

    example of the code I added to change the style

    #site-title a { color: #D22929; }

    and that was after the @import but it didn’t do anything! I suppose I can’t complain as twenty eleven seems to be working. Also, twnenty eleven seems to be better as well as it has footer widget areas already.

    It would be nice to know why it didn’t work though.

    Twentytwelve doesn’t use the same CSS selectors – try this: a {
        color: #009900;

    Great – thanks

    Well this code business is going to be a adventure isn’t it.

    One more question, I was reading a tutorial for adding a widget footer area for twenty twelve. It said I could copy the the functions.php and footer.php from the parent theme into the child theme before I edit the code within them but as soon an I copy over the .php files the site crashes with a 500 internal sever error.

    Have I made a stupid mistake?

    Yeah, the footer.php gets copied as is, but with functions.php, it’s a bit more complicated — see this:

    If you need more help on adding the widget, why don’t you start a new thread and then someone (who’s a better coder than I am 🙂 ) can give you a hand with that. Including a link to the tutorial would be good too.

    A couple more hopefully helpful bits on the CSS – this is a good reference site:

    Your best friend for working with CSS is a tool such as Firebug – as it shows you what’s going on with the CSS for a specific element on the page and you can test changes in the browser before making them in the actual site code.

    thanks you’re a life saver

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Child Theme Problems importing Parent style.css’ is closed to new replies.