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 trialshareyourpeace
3,244 PointsAt time. 5:20. Normal_css is used for 2 wp_enqueue statements. Why ?
Wp_enqueue_style uses the same name 2x. Normalize_css is used for both Normalize.css and also the google fonts link copied from @import.
Question. Why are two of these enqueue statements allowed to use the same 'name' ?
Thanks
2 Answers
Zac Gordon
Treehouse Guest TeacherYup, as you saw, just a mistake that gets corrected when we circle back to the CSS once it's loading in the header :)
shareyourpeace
3,244 PointsZac.
With the reformatting and upgrading of this course (which I started from the beginning again), I believe that you missed including in this update, what is reference as 'circling around' to correct the above error in the code.
I looked in the downloaded projects folder, at the final functions.php.
wp_enqueue_style( 'foundation_css', get_template_directory_uri() . '/css/foundation.css' );
//wp_enqueue_style( 'normalize_css', get_template_directory_uri() . '/css/normalize.css' );
wp_enqueue_style( 'googlefont_css', 'http://fonts.googleapis.com/css?family=Asap:400,700,400italic,700italic' );
wp_enqueue_style( 'main_css', get_template_directory_uri() . '/style.css' );
Bob Sutherton
20,160 PointsYeah, I got hung up here too. I was trying to load a google font into my own site and it wasn't working. When I saw this and changed the name of the file it started working. I had started to give it its own name but when Zac named it the same I followed suit. Haha!
shareyourpeace
3,244 Pointsshareyourpeace
3,244 Pointsresolved. Zac will point out in the next chapter about Loops that these names need to be differentiated.