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 WordPress Theme Development Working with CSS and JS in WordPress Themes Adding CSS to a Theme Via the functions.php File

Sean May
Sean May
9,145 Points

Errors should be corrected in this video, it's confusing otherwise

I feel like I'm learning a lot in this course, but there are some basic errors in this video that I think could really throw some people off if they don't notice them.

First, the video ends with the wp_enqueue_style statement referencing the file 'foundations.css', but the file is actually 'foundation.css'

Also, the name 'normalize_css' is used twice once for the actual normalize.css and once for the importing of the Google Fonts file.

They're not huge errors and I gather they may be fixed in future videos, but I still feel like tutorials shouldn't leave incorrect code in them when they're finished up.

Noemi Totos
Noemi Totos
12,601 Points

The 'normalize.css' is used twice deliberately. It's not an error. If you continue watching the upcoming videos, you'll understand why.

Ian Mackenzie
Ian Mackenzie
11,062 Points

I'm confused by the last wp_enqueue_style where the name is main_css but the file is style.css. I know one is queuing the file and one is the file name but why are the other wp_enqueue_style named exactly as the file name but not the last one.

Does it make a different to how it works?

Yes Noemi it is an error. In a later video Zac correct the errors, but that is only because he didn't want to go back and redo the video.

Zac is known for being pretty baked when he records his videos, that's why he smiles so much.

2 Answers

Raul Vega
PLUS
Raul Vega
Courses Plus Student 3,803 Points

First he blew it writing foundations.php, then he quietly renamed it to foundations.css without even apologizing, and never fixed the extra 's' that should not be there.

I did notice the error but it ruined my concentration flow and made my brain kinda tired making me having to take a break and watch the video again, I should be focused on learning new things, not on fixing the teacher's distracting errors.

Dayne Wright
Dayne Wright
11,235 Points

Ian,

I think the handle can be any name you want to make it. The style.css file IS the main CSS style sheet for the theme so he just labeled it that way. It could have easily worked as style_css from what I understand.

Yes Dayne, but the name has to be unique. Otherwise you'll get an error.