WordPress.org

Support

Support » Themes and Templates » [Resolved] Yet another child theme problem – Can't activate child theme

[Resolved] Yet another child theme problem – Can't activate child theme

  • I’ve been trying to implement a child theme on my WordPress site and have searched for a couple hours on Google to solve my problem. When I go into the WordPress admin under “Themes”, I don’t see my child theme listed. I see a lot of people having problems with case-sensitivity or incorrect directories being referenced in the “Template” section of the style.css header, but I’ve checked mine a hundred times. Does anyone have an idea why my theme isn’t showing up to activate?

    Here is the directory layout:

    ./wordpress/wp-content/themes/rustic
    ./wordpress/wp-content/themes/rustic-child

    Here is the current style.css file under rustic-child:

    /*
    Theme Name: Rustic
    Theme URI: http://www.williambrentblack.com
    Description: Child Theme for Rustic
    Author: Wbb
    Author URI: http://www.williambrentblack.com/
    Template: rustic
    Version: 0.1
    */

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

Viewing 15 replies - 1 through 15 (of 30 total)
  • esmi

    @esmi

    Forum Moderator

    What did you use to create the child’s style.css file?

    Very good question. I used TextWrangler on my Mac. I’ve seen problems with creating files using the regular TextEdit app adding a bunch of extra scripting to the files but I don’t *think* TextWrangler is doing this. When I view the file with other readers, all of them appear to preview the text correctly (ie. I don’t see any weird characters anywhere).

    You can’t name you Child Theme the same thing as your Parent Theme:

    Theme Name: Rustic
    Template: rustic

    These two values must be different. Try naming your Child Theme “Rustic Child Theme”

    esmi

    @esmi

    Forum Moderator

    Unfortunately, I’m not a Mac user but I’m pretty sure that TextWrangler shouldn’t cause any problems. It’s listed on http://codex.wordpress.org/Glossary#Text_editor However, you might want to re-check the File/Save settings. My guess is that WP is having problems trying to read the style.css file.

    esmi

    @esmi

    Forum Moderator

    @chip: Oh – well spotted! I completely missed that!

    @chip – That is good information and makes complete sense. I changed the name, however, the theme still isn’t showing up. Just to clarify, the theme should appear as an option under “Manage Theme”, right? I don’t need to “install” it since it’s already on my web server?

    Esmi – I’m thinking your idea is probably correct. Do you by any chance know which encoding format works for sure? Unicode? Western?

    esmi

    @esmi

    Forum Moderator

    the theme should appear as an option under “Manage Theme”, right?

    Correct.

    FWIW, I use ANSI encoding/UNIX format when saving theme files on a PC.

    Well, what the heck. I changed my file to Unicode-8/UNIX and it’s still not working. Is it possible for my parent theme to somehow prevent the use of a child theme?

    I’ve checked all the permissions on the files. It’s probably something really dumb.

    esmi

    @esmi

    Forum Moderator

    Not all themes are particularly child-theme-friendly but I wouldn’t have thought it could block a child them from being shown in the Theme list. What did you rename the child theme to?

    Not all themes are particularly child-theme-friendly but I wouldn’t have thought it could block a child them from being shown in the Theme list

    That’s what I thought, but I wasn’t sure.

    Here is how the file currently looks:

    /*
    Theme Name: Rustic-Child Theme
    Theme URI: http://www.williambrentblack.com
    Description: Child Theme for Rustic
    Author: Wbb
    Author URI: http://www.williambrentblack.com/
    Template: rustic
    Version: 0.1
    */

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

    At the very least, it should be listed at the bottom of the page, under “Broken Themes”. If you find it there, can you report the exact error message?

    Also, you need to report the Template name exactly as it appears in Theme Name of the Parent Theme’s style.css file. So, try changing this:

    Theme Name: Rustic-Child Theme
    Template: rustic

    to this:

    Theme Name: Rustic-Child Theme
    Template: Rustic

    Also, you need to report the Template name exactly as it appears in Theme Name of the Parent Theme’s style.css file

    Tried that too but it’s still no joy. I’m not seeing any “Broke Themes” section under the Manage Themes section.

    I normally wouldn’t do this, but I just enabled directory access to my website temporarily. If you guys would’t mind taking a look, maybe you can find something wrong that I’m not seeing?

    http://williambrentblack.com/wordpress/wp-content/themes/

    Sorry, guys and gals. 😉

    @chip – I confirmed that the parent style.css is named Rustic, which matches my child header name. Unfortunately, still no go.

    Theme Name: Rustic

    Tried that too but it’s still no joy. I’m not seeing any “Broke Themes” section under the Manage Themes section.

    You also have two Themes, “Rustic Child” and “Rustic Child Temp”, in your Themes directory, both of which claim the same Theme name. You might want to remove one, or give one a different Theme Name: header.

Viewing 15 replies - 1 through 15 (of 30 total)
  • The topic ‘[Resolved] Yet another child theme problem – Can't activate child theme’ is closed to new replies.
Skip to toolbar