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

Floyd Orr
Floyd Orr
11,723 Points

style.css will overwrite other one that is in the file when we copy and past it.

I've spend all day and having problems with this step.I Downloaded cyber duck for FTP. I did one click install for wp. Then I extracted the wordpress on my desktop. Then I extract the course download. Then I make a copy of twentythirteen and extract it and rename the copied one twentythirteenchild.

When I try to put the files from the course download (style.css and screenshot) in to the twentythirteenchild file I get a message if I want to replace the original file because there is a file in there with he same name as style.css. The instructor didn't have to do that. What should I do? Should I replace the file and I'm supposed to extract the twentythirteenchild right?

Floyd Orr
Floyd Orr
11,723 Points

Now I get error message : Fatal error: Cannot redeclare twentythirteen_setup() (previously declared in /home/naturala/public_html/wp-content/themes/twentythirteenchild/functions.php:69) in /home/naturala/public_html/wp-content/themes/twentythirteen/functions.php on line 108

Earlier I kept having problems when I first tried I did 5 minute install. Then uninstalled it. Then did a one click install and uninstalled it again. Maybe it's not completly uninsstalled. It looks like it in cpanel maybe the FTP keeps a copy. I'm just all messed up. Everything was great until this section.

2 Answers

Colin Marshall
Colin Marshall
32,861 Points

When you make the child theme directory it should not be a copy of the parent theme with all the files from it. You only want to have the parent theme files you are overriding in the child theme directory. So your child theme directory should start out empty. To make the child theme work, you add a style.css file to it which points to the parent theme. You also should have a functions.php file in your child theme to properly enqueue your child theme's styles after the parent theme's files when the page is loaded.

The Child Themes section of the WordPress Codex is something you might want to read for more info on child themes and how they work.

Floyd Orr
Floyd Orr
11,723 Points

I my problem was I was copying everything. Thank you very much I almost paid for a code mentor because i was so frustrated.

Colin Marshall
Colin Marshall
32,861 Points

No problem! You can almost always find an answer to any question you have about web development by googling, or by posing the question to an online community that is relevant to your problem. There is no need to hire somebody for a general question such as this one, unless you are under a strict deadline and you can't wait for the community to answer your question. Strangers are surprisingly helpful in this industry :)