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

Randall Zepeda
Randall Zepeda
1,979 Points

I use to like treehouse but it teaches too specific and when you try doing something else its a whole new complication

for instance the wordpress make a child theme. It shows you how to make the child theme for the ugly 2013 parent theme but THATS IT. I want to use a different theme but its a whole new set of info to get that running especially when you have to learn how to customize everything on the child theme as well so basically I need a new website that will help me step by step on how to do ANY child theme and the wordpress.org child theme tutorial doesnt really help either. Where can beginners learn step by step how to customize using sftp on cyberduck?

2 Answers

Wally Soukoroff
Wally Soukoroff
6,649 Points

Hey Randall, you sound a little frustrated here so hopefully I can give you some insights and quell your frustrations a little bit.

I have used WordPress for a while now and what I say will be from my personal experience as I haven't delved into the Treehouse courses about WordPress yet.

First off, I find Treehouse awesome so far but you have to keep in mind that what Treehouse offers and teaches is only one perspective of the things you want to learn. For me with anything I've learned, I've had to seek out several different perspectives on the same subjects as different individuals will explain the same thing you want to know differently. One teacher can teach or try to explain something which may resonate with you immediately or make absolutely no sense to you because of their style in how they explain things.

I would recommend seeking out other tutorials on making a child theme for WordPress from a bunch of other sources online other than Treehouse. Once you do this a few times I'm sure you'll find a perspective from someone that will make more sense to you. You'll also find that you'll get a better understanding of what you want to know as a whole from these different perspectives.

As an example in my own journey when I wanted to know about making child themes, I looked at several different tutorials online before I was able to recognize that there's really only 5 things you need to do to make a child theme for WordPress from any theme you want to use. Each one of these tutorials was specific to a theme that they used for their tutorial just like I'm assuming you experienced with the tutorial here on Treehouse.

For this quick tutorial I just created for you, I'll use the name of "Randall" for the original/parent theme name in the following instructions.

1. Create a child theme folder called, "Randall-Child". (Randall would be the name of any theme you're making the child theme from and needs to be exactly the same as what the parent theme is named)

2. Copy the style.css and screenshot.png files from the Randall parent theme and paste them into the child theme folder you created called Randall-Child. (you do need the style.css file in a child theme for it to work but you don't need the screenshot. I always put the screenshot in so there's an image for the child theme in the WordPress admin)

3. Open the style.css file from your child theme folder and remove all the style declarations from this css file except the comment block at the top which has the WordPress theme specific information and the media query argument declarations (to keep the responsive design breakpoints of the parent theme).

You would keep the following:

/*
Theme Name: Randall Theme
Description: Randall theme.
Version: 1.0
Author: Randall
Author URI: http://www.randall.com/
*/


/* Responsive Break Points */
@media only screen and (max-width: 767px) {

}

@media(max-width: 480px) {
/*For Small Screens*/

}

@media(max-width: 320px) {
/*For Really Small Screens*/

}

4. Add the following line to the comment block at the top under the last line and before the closing comment code. You can also add some other info to indicate it is the child theme.

Template: Randall (the parent theme name needs to be exactly as the parent theme folder is named)

/*
Theme Name: Randall Theme Child
Description: Child theme for Randall theme.
Version: 1.0
Author: Randall
Author URI: http://www.randall.com/
Template: Randall
*/


/* Responsive Break Points */
@media only screen and (max-width: 767px) {

}

@media(max-width: 480px) {
/*For Small Screens*/

}

@media(max-width: 320px) {
/*For Really Small Screens*/

}

5. Add the @import css declaration below the WordPress comment block to import the parent theme's style.css file as follows and save the style.css file.

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

/*
Theme Name: Randall Theme Child
Description: Child theme for Randall theme.
Version: 1.0
Author: Randall
Author URI: http://www.randall.com/
Template: Randall
*/

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

/* Your custom styles would go below here */


/* Responsive Break Points */
@media only screen and (max-width: 767px) {

}

@media(max-width: 480px) {
/*For Small Screens*/

}

@media(max-width: 320px) {
/*For Really Small Screens*/

}

Then all you need to do is put both the parent theme and the child theme you made into the Themes folder of WordPress (wp-content/themes), login to your WordPress admin and activate the child theme.

If you then wanted to adjust the header or footer template files of the parent theme you would then copy the header.php and footer.php files from the parent theme and paste them into your child theme. Then you would edit these files that would be in your child theme folder. The same would be true for any other template file you would want to adjust.

So Randall I hope this helps and if it doesn't go to google and search out how to create a child theme for WordPress. Find the perspective that you understand and then it will all come together for you in your mind.

Cheers!!!

Wally, you're the one who should be working at Treehouse. That answer is awesome.

Wally Soukoroff
Wally Soukoroff
6,649 Points

Thanks Stephen, I really appreciate that! Even though I've been designing and developing websites since 2004, I still have a hell of a lot of stuff I need and want to learn, which is why I started this next part of my journey through Treehouse.

I picked up programming about a year ago now, and it's been a rabbit hole for sure. There is always more...always.

Hey Randall,

I just noticed this post and I thought I would reach out to you with a few suggestions. I understand what you are saying, Wordpress is hard to learn because it's not a generic skill set. The generic skill sets required are working knowledge of PHP, mySQL, CSS, and the Wordpress software. It's a pretty big knowledge base.

If you want to be comfortable taking the skills you learn in courses like designing a child theme and apply them universally as a developer, you should focus more of your study on mastering widely applicable knowledge like the Wordpress Codex, and the template hierarchy. I saw from your profile that you are familiar with PHP, but you should understand PHP basics because most of Wordpress development centers around actions & filters which are simply custom PHP functions. Furthermore, you need to understand how databases feed information into Wordpress to create dynamic content. You can find a great tutorial on that topic here. After that, I promise you will easily grasp how to apply things in the child theme course to whatever theme you would like.

I hope this helps and these suggestions clarify where to find curriculum with broad specificity, that you can then apply to specific development problems like how to customize using sftp on cyberduck.

Good luck!