WordPress.org

Ready to get started?Download WordPress

Forums

Child theme not importing (8 posts)

  1. hazypicture
    Member
    Posted 1 year ago #

    Hi,

    I'm very new to this and trying to do a few minor edits to the Twentytwelve, but having a minor problem with the child theme: I don't think the child is importing its parent. When I click "live preview," it does not seem have the 2012 style.

    I added a new folder under "wp-content/themes" called "twentytwelve-child", created a new "style.css" file and entered the following code:

    /*
    Theme Name:     Twenty Twelve DDChild
    Theme URI:      http://deaddarlings.com
    Description:    Dead Darlings Child theme for the Twenty Twelve theme
    Author:         Jack Ferris
    Author URI:     deaddarlings.com
    Template:       twentytwelve
    Version:        0.1.0
    */
    @import url("../twentytwelve/style.css");

    When I edit the CSS file, my cpanel defaults to "utf-8" for character coding, if that helps.

    Thanks in advance for any help!

  2. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    You should use a plain text editor to create the style.css file - and upload via FTP - file format does matter -

    http://wordpress.org/support/topic/import-command-not-working-in-child-theme?replies=9

  3. hazypicture
    Member
    Posted 1 year ago #

    Thanks - I tried this using Notepad, saving as .css and uploading, but I'm still running into the same problem. CPanel notes that the file is "ASCII C program text, with CRLF line terminators." Notepad does save it with ANSI encoding. I tried directly copy/pasting the text, as in the link that was attached, but that didn't seem to help either.

  4. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    Have you activated the child theme? Link to your site?

  5. hazypicture
    Member
    Posted 1 year ago #

    I can activate it for a moment: http://deaddarlings.com/

    I should revert in a bit.

  6. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    Look at the @ import line in your style.css file:

    /*
    Theme Name:     Twenty Twelve DDChild
    Theme URI:      http://deaddarlings.com
    Description:    Dead Darlings Child theme for the Twenty Twelve theme
    Author:         Emily Ross and Jack Ferris
    Author URI:     deaddarlings.com
    Template:       twentytwelve
    Version:        0.1.0
    */
    @import url(../twentyeleven/style.css);
  7. hazypicture
    Member
    Posted 1 year ago #

    Jeez, what a ridiculous mistake for me to make! It took me two solid minutes of staring to even notice what you'd meant, too.

    Thanks, I've changed "eleven" to "twelve." It's not working yet, but right now I'm assuming it just takes a few moments to update.

  8. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    LOL - we've all done that kind of thing! But actually when you change that line, you need to switch to another theme and then back again to get it working :).

Topic Closed

This topic has been closed to new replies.

About this Topic