WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Can't import parent theme into child theme (twenty twelve) (10 posts)

  1. Marcal
    Member
    Posted 1 year ago #

    I can't import the twenty twelve parent theme in my child theme. Here is the code I have. Can someone help me?

    /*
    Theme Name: Twenty Twelve Child Theme
    Theme URI: http://www.redaq.ca
    Description: Child theme for the Twenty Twelve theme
    Author: Marc Alexandre Prudhomme
    Author URI: http://www.redaq.ca
    Template: twentytwelve
    Version: 0.1.0
    */
    
    @import url("../twentytwelve/style.css");
  2. That should work... Did you put that in it's own wp-content/themes/twentytwelve-child directory and name that file style.css?

  3. Marcal
    Member
    Posted 1 year ago #

    Yes I did, although it is my first time doing it, but my website would not appear without any style if I had not done it like that from what I understand.

  4. Marcal
    Member
    Posted 1 year ago #

    Thanks for the help. I ended up finding the solution. I deleted the spaces that were between the name of the file in which I had put my style.css file. I had called it twenty twelve child theme and now it is twentytwelvechildtheme

  5. auoconnell
    Member
    Posted 1 year ago #

    I am having the exact same problem. I created a folder under wp-content/themes for my child theme. The folder name has no spaces in it. The folder contains a file named style.css which contains the following code:

    /*
    Theme Name: Twenty Twelve Child
    Theme URI: http://alexoconnell.com/
    Description: Child Theme for Twenty Twelve
    Author: auoconnell
    Author URI: http://alexoconnell.com/
    Template: twentytwelve
    Version: 0.1
    */

    @import url("../twentytwelve/style.css");

    It's not importing, however. What am I overlooking?

    Thanks!

    Alex

  6. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    Did you activate (switch to) the child theme? Right now, your site just shows the regular twentytwelve theme.

  7. auoconnell
    Member
    Posted 1 year ago #

    I did activate the child theme, but it's a blank slate, and so I switched back to the parent theme while I am troubleshooting. I don't want my site looking terrible for a long period of time. Do you need me to switch to the child theme in order to make any comments? I can do that if it helps.

    Thanks!

  8. auoconnell
    Member
    Posted 1 year ago #

    Well, this problem seems to have solved itself... my site is now importing the parent settings, although I didn't change anything. Yay, I guess :)

  9. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    Cool - yay indeed! (Sometimes websites just act weird - or worse LOL) Glad it fixed itself.

  10. atlasferone
    Member
    Posted 1 year ago #

    Marcal, you saved me from agony of the same issue you have been struggling with. Deleting the spaces between the name of the folder - "childofthemetwelve" instead of "child of theme twelve" did the trick. Wheh! Thank you so much!

Topic Closed

This topic has been closed to new replies.

About this Topic