WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [closed] Can't get twentytwelve child theme to work (31 posts)

  1. ian277
    Member
    Posted 1 year ago #

    Hi all,

    I can't get the new twentytwelve child theme to work out. Here's my style.css created in dreamweaver and saved as a style.css file.

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

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

    No style shows on my child theme. I've done a test and created a twentyeleven child theme this way and it works fine. Any thoughts?

    Thanks a bunch in advance!

  2. esmi
    Forum Moderator
    Posted 1 year ago #

    I've just created a Twenty Twelve child theme and it worked just fine.

  3. ian277
    Member
    Posted 1 year ago #

    Hmmm, not sure what the problem is then, or what I'm missing. I've cleared my cache, and done the exact same thing with my twentyeleven theme.

  4. esmi
    Forum Moderator
    Posted 1 year ago #

    /*
    Theme Name:Twenty Twelve Child
    Version: 1.0
    Template: twentytwelve
    License: GNU General Public License v2
    License URI: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
    */
  5. ian277
    Member
    Posted 1 year ago #

    Thanks Esmi,

    I've tested with the twentyten child theme as well, and it workded fine. And I just tried the above and added the import style.css and still didn't work for twentytwelve.

    Can you recognize any mistakes I'm making? tests for both twentyeleven and twentyten work this way.

    Frustration is building.

    Thanks

  6. esmi
    Forum Moderator
    Posted 1 year ago #

    Nothing is jumping off the page at me. If it helps, you can download the child theme I just put together from Quirm.net. See if that works for you.

  7. ian277
    Member
    Posted 1 year ago #

    Thanks Esmi!

    Just tried it........but it's not working. I'm going to go for a run before I accidentally throw my computer out the window. I'll check out every detail and see what if I can find the issue and let you know. Argh.

    Thanks for the help.

  8. esmi
    Forum Moderator
    Posted 1 year ago #

    Hmm... then it sounds like you might have a server problem. Have you checked your server's error logs for clues?

  9. ian277
    Member
    Posted 1 year ago #

    I've checked the error logs on my cpanel and there is nothing there. Understandable since I haven't even started on my site because I want the child theme. Very strange. I can't figure out what the issue is.

  10. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    can you actually activate the child theme?

    and does it respond if you add your own css into style.css of the child theme?

    ps:
    if you can activate the child theme, could you leave it activated until someone had the chance to check (with Firebug or similar) how it appears and if it includes the stylesheets?

  11. esmi
    Forum Moderator
    Posted 1 year ago #

  12. ian277
    Member
    Posted 1 year ago #

    I can activate the twentytwelve child theme but it results in no parent theme style, and if I add code from another website through "inspect element" as a test, nothing happens either. I've done the same thing to confirm this test with other child themes and it works fine, so I know it's not the code copy I'm using.

    Esmi, apologies but I am very new to this. I've taken example code from "enabling error logging" but see no changes.

    Ay carumba.

  13. esmi
    Forum Moderator
    Posted 1 year ago #

    Is this using the theme copy that I uploaded yesterday?

  14. ian277
    Member
    Posted 1 year ago #

    Sure is. (thanks again, btw)

    Cleared cache, switched themes, uploaded my style.css, tried yours again, created other child themes(and worked), etc.

    It's only an issue with twentytwelve.

  15. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    thanks for temporarily having the child theme activated;

    the style.css (and all of the other files from esmi's download) of the child theme seem to be non existant - calling them directly gives a 'file not found' error;

    how did you install the child theme?

    have you checked the themes folder /wp-content/themes/ per ftp or file management system of your hoster for the right location of the theme files?

  16. ian277
    Member
    Posted 1 year ago #

    Yeah, using cyberduck I've created a twentytwelve child folder under the website's content folder, and again under themes. I've since downloaded the style.css file to confirm it was there, and verbatim of was Esmi so graciously sent me.

    The child theme is recognized in my theme section of my dashboard but no style is included.

    I hope it's me doing something I can correct and not some weird anomaly like Neo in the Matrix.

  17. esmi
    Forum Moderator
    Posted 1 year ago #

    Did you open the style.css file in your own text editor at all? I'm wondering if perhaps it's a file encoding issue.

  18. ian277
    Member
    Posted 1 year ago #

    I opened the css file in dreamweaver and everything looks right.

  19. esmi
    Forum Moderator
    Posted 1 year ago #

    Can I suggest downloading a fresh copy, unpacking it and uploading it straight to your site? And also make sure that you are uploading the .css file in ASCII (as opposed to binary) format.

  20. Andy Fragen
    Member
    Posted 1 year ago #

    Do you have to be using a WP 3.5beta for a 2012 child to work?

  21. jmat99
    Member
    Posted 1 year ago #

    resolved my problem, can't find how to delete this post

  22. Andy Fragen
    Member
    Posted 1 year ago #

    I've resolved this as well. On 3.4.2. What I did was create another 2012 child theme that was empty except for @import. I activated it. Then I went back and was able to active my other child theme. It then seemed to take. I don't have any idea egg it just didn't work the first time.

  23. ian277
    Member
    Posted 1 year ago #

    Thanks guys, but no change for me. I can't seem to get it to function properly. Any other steps you think I should take?

    Thanks.

  24. ruben stranger
    Member
    Posted 1 year ago #

    You have a typo, @esmi. You wrote Theme Name:Twenty Twelve Child, missing a space after colon, should be Theme Name: Twenty Twelve Child.

    Hope that works...

  25. ian277
    Member
    Posted 1 year ago #

    I appreciate all the help everyone - no changes I've made had any impact though. I'll keep working on it and let everyone know of my success.

  26. ian277
    Member
    Posted 1 year ago #

    Hi everyone,

    I've resolved this issue with Andrew Nevin's help.

    My problem was the folder name for my child theme. I had it as twentytwelve child but removed the space and changed it to twentytwelvechild and the style.css worked.

    Thanks for all the help!

  27. Madalin Ignisca
    Member
    Posted 1 year ago #

    the right way is to work with the functions.php file:

    wp_dequeue_style( 'twentytwelve-style' );
    wp_deregister_style( 'twentytwelve-style' );
    wp_register_style( 'twentytwelve_style', get_template_directory_uri() . '/style.css' );
    wp_enqueue_style( 'twentytwelve_style' );

    must be put where it should. codex :)

  28. Dobop
    Member
    Posted 1 year ago #

    Interesting...
    Today I got the same problem as ian277 when I tried his code for my child theme css.
    My solution was just to get rid of the quotes and the template import worked.

    /*
    Theme Name: Twenty Twelve Child
    Template: twentytwelve
    */
    @import url(../twentytwelve/style.css);
  29. Runtheball
    Member
    Posted 1 year ago #

    My problem was the folder name for my child theme. I had it as twentytwelve child but removed the space and changed it to twentytwelvechild and the style.css worked.

    Confirmed. I had exactly the same problem, and removing the space in the child theme name solved it.

  30. c-ro
    Member
    Posted 1 year ago #

    I'm having a similar problem. The previous fixes have not worked.
    A formatting change is occurring; however, it's not correct.
    Site: artuspt.com

    Newbie, please help.

Topic Closed

This topic has been closed to new replies.

About this Topic