• Just started on WordPress and am now on using child themes to customise a parent theme. I’ve followed the coding rules and used the code below, but while using the last seven lines of code does what it’s supposed to do – wipe out the parent style; when I go back and add the first line of code – @import url (‘../twentyten/style.css’); – to get the child theme to use the parent theme style, nothing happens, there is no import of parent theme style. Any ideas? All folders have been correctly added in the right places. I’m on a Mac and I’m using Komodo as my text editor.

    Thanks in advance.

    @import url (‘../twentyten/style.css’);
    /*
    Theme Name: Child of TwentyTen
    Theme URI: http//www.?.com
    Description: This is my first child theme
    Author: john kimon
    Template: twentyten
    /*

Viewing 6 replies - 31 through 36 (of 36 total)
  • Hi Peredur,

    Was that directed at me? Sorry for any confusion.

    Yes. I just downloaded the latest version of WP and the default themes remain twentyten and twentyeleven.

    Look in the wp-content/themes directory. If you don’t see twentytwelve in there, then it doesn’t exist.

    Cheers

    PAE

    check the new file that you saved is saved as “”style.css”” and NOT as “style.css.txt” ..

    Yes, Mr. Predur .. I visited this section to post a new topic about the child theme.. but as I have tried child themes with the basic themes and get it work properly.

    But, I have just downloaded a free theme and FOUND THAT – its style.css is
    just empty.. And, the actual style.css is in /css/default/style.css ..

    I created the child the style.css the same way as is the history, but.. later on found that .. the style.css is in a sub-folder of the parent theme..

    Now, as supposed it is not being imported to the child theme ;;
    I tried using ::
    @import url(../parent/css/default/style.css);

    but nothing works.. Please suggest something.

    Thanks Peredur, but yes I’ve downloaded the newest twentytwelve theme but I can’t seem to get the child theme style to work.

    ak.singla, I’ve created the css file in dreamweaver (first time user), and saved it as style.css.

    I’ve done a test and created a child theme for the twentyeleven theme and it worked just fine. When I tried to do the same with the twentytwelve, the child theme didn’t work.

    /*
    Theme Name: Twenty Twelve Child
    Template: twentytwelve
    */

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

    Thanks for the help.

    Ok, folks, You are posting to an 8 month old topic that was about a different subject. Please post your own topics. I am now closing this one.

Viewing 6 replies - 31 through 36 (of 36 total)
  • The topic ‘Can't get child theme to use parent theme style’ is closed to new replies.