• Resolved eclecticitguy

    (@eclecticitguy)


    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: https://www.williambrentblack.com
    Description: Child Theme for Rustic
    Author: Wbb
    Author URI: https://www.williambrentblack.com/
    Template: rustic
    Version: 0.1
    */

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

Viewing 15 replies - 1 through 15 (of 30 total)
  • What did you use to create the child’s style.css file?

    Thread Starter eclecticitguy

    (@eclecticitguy)

    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”

    Unfortunately, I’m not a Mac user but I’m pretty sure that TextWrangler shouldn’t cause any problems. It’s listed on https://codex.www.ads-software.com/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.

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

    Thread Starter eclecticitguy

    (@eclecticitguy)

    @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?

    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.

    Thread Starter eclecticitguy

    (@eclecticitguy)

    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.

    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?

    Thread Starter eclecticitguy

    (@eclecticitguy)

    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: https://www.williambrentblack.com
    Description: Child Theme for Rustic
    Author: Wbb
    Author URI: https://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

    Thread Starter eclecticitguy

    (@eclecticitguy)

    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?

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

    Thread Starter eclecticitguy

    (@eclecticitguy)

    Sorry, guys and gals. ??

    Thread Starter eclecticitguy

    (@eclecticitguy)

    @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 ‘Yet another child theme problem – Can't activate child theme’ is closed to new replies.