Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

WordPress How to Make a Website with WordPress Customizing WordPress Themes How to Make Child Themes

Made a child theme but it is not loading all of the styles.

Created a child theme for restauranteur theme following all of the steps in the video. The child theme is coming up on my admin panel and I can activate it, but it is not loading all of the buttons and styles correctly. I'm looking through the codex and it is talking about a function.php file that is necessary for the child theme to enqueue properly but I don't see anything about that in the lecture. I'm a beginner and new to this, any guidance would be appreciated!

1 Answer

It will depend when the video was made as to how they will have approached the loading of the parent theme's styles...

It is only fairly recently that the codex has been updated to promote the use of the functions.php file to correctly enqueue the styles, and to be fair it is a better practice than the alternative.

Previously it was common place to use an @import rule in your child theme's style.css to grab the stylesheet from the parent theme first, and then override your styles from there. It sounds like this may be the method used in the video here on Treehouse.

If I were you I would go ahead and create a functions.php file in your child theme and follow the guidance in the codex as to how to correctly enqueue it up. It is very straight forward and prevents using the @import which has long been frowned upon anyway (not just with WordPress!).

If you need a hand or a pointer with anything just holler! :-)