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 Customizing WordPress Theme Files

Martin La Touche
Martin La Touche
1,709 Points

Wordpress.org has different instructions for setting up child theme. Can you please clarify.

Hi there, I have already set up a child theme for my learning project, following the instructions on the wp.org site. In this, it says to create a functions.php file and copy some code they give you into this rather than the @import code you mention. It says that @import is no longer best practice. Can you please clarify this for me.

By the way, my child theme does work with the method I followed.

2 Answers

Jason Anders
MOD
Jason Anders
Treehouse Moderator 145,860 Points

Hey Martin,

Code is always evolving. The video you are linking from was recorded a little over a year ago, so it is really not surprising that its "best practice' is no longer the current "best practice."

It's great that you noticed the difference and were able to adapt to the newest and more recommended way. This is what will be of great benefit down the line as a coder. So, yes, whatever is in the current WordPress Codex ... that is the way you should be doing it. :)

There will always be something changing somewhere. Keep Coding! :dizzy:

Martin La Touche
Martin La Touche
1,709 Points

Thanks for response and feedback. If anyone else is looking for the information it's in 'child themes' in wp.org support.