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 trialPhilip Carpentier
11,931 PointsNo longer best practice?
I was just on the WordPress Codex reading up on childthemes.
They say: "Note that the previous method was to import the parent theme stylesheet using @import: this is no longer best practice. "
Should I still use the import-method? Or is it best to follow the recomendations on the WP Codex?
1 Answer
Stephen Van Delinder
21,457 PointsHey Philip,
I noticed that too recently. I'm not sure, but I think that they suggest enqueueing all of the styles and scripts in functions.php so all of your calls to the server are in one place. It makes for an easier structure, and it could conceivably increase page load speed slightly.
I'd recommend knowing how to do it both ways, but you can use @import, it will work fine.
Good Luck!
Philip Carpentier
11,931 PointsPhilip Carpentier
11,931 PointsThanks! :-)