Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress How to Make a Website with WordPress Customizing WordPress Themes How to Make Child Themes

uploaded the themechild via FileZilla but still cant find the themechild in the wordpress admin area (under the themes)

Here is the rundown of what I did and the problem that I am having:

Already has a simple wordpress site going (Griffin Theme), for practicing along side Zac's "Learn Wordpress" Track. While following that track I obviosly used the 1-click install method to get the site running.

Started taking "Wordpress Development" Track and attempted to do the 5-minute install for my existing site. Followed the exact steps HOWEVER when logged in to mysite.com/wp-admin, it skipped the wp-config.php installation part and logged straight to my dashboard(this might be the core of my problem).

Afterwads, I followd the "How to Make a Child theme" video. But I realized that I haven't the the griffin theme locally since I had it running before the 5 minute install. Using Fila Zilla, I dragged the public_html/wp-content the public side on to my local side so I have the same settings on both sides. Only then I created a themechild folder (griffinchild) in the local path (wp-content/themes). Created the style.css file and implied the import method: @import "../griffin/style.css"; and copied the screenshot.php from the griffin folder to griffinchild folder.

I copied the griffinchild folder from the local host to the public host via File Zilla.

I go to my website admin -> themes

and I get the main problem: I cannot find the duplicated griffinchild theme.

In the theme section, thought, when I scroll down I see that "Broken Themes - the following themes are instaleed bu incomplete. Themes must have a stylesheet and a template. Name: Griffin Description: Template is missing"

Appologize for such a long message but I tried to provide as much details as possible so hopefully the adequate answer can be provided :)

Thanks for taking the time to read this.

2 Answers

Andrew Shook
Andrew Shook
31,709 Points

You need to add a line to the comment at the top of the style.css file in the child theme to let WordPress know what the name of the parent theme is.

Theme Name:  Whatever
 Theme URI:    http://example.com/whatever
 Description:  Something something something
 Author:      Whom Ever
 Author URI:   http://example.com
 Template:    parent themes slug

I've never made a child theme, but I am pretty sure that you use the slug for the parent theme and not theme name.

Worked!!! Spent nearly an entire noon trying to figure this thing out...

Cant thank you enough Andery!

got excited little bit too early :(

the wd-admin theme section recognized the child theme. I activated it. Refreshed the front-end side and the theme is missing some css elements from the parent theme.

Maybe it is something to do with this specific theme.

I am having a similar issue. I carried out the one-click install therefore none of the Wordpress files were in my local directory. Therefore I downloaded all the files from the server into my directory using FZ. Then I created the style.css, and modified the text in Sublime to reflect the theme I am using (padhang), but when I go to the Padhang child theme on Wordpress, I don't have any style or content in the child theme (the style and content only appears on selecting the original Pahang theme).

I am writing the following along with the other required lines:

Template: padhang

@import "../padhang/style.css";

Help!..

***EDIT

I have solved the problem, basically by ditching the theme I was working with, for a new theme. It seems that actually the code was correct, but I think as I made modifications to the parent theme a while before creating the child theme, this caused problems when creating the child theme. I tried removing and re-installing the parent theme, but the modifications I made still appeared in the parent theme and not the child, so I've started working with a new theme. The child theme now mimics the parent theme perfectly!..