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.

Jose Estrada
1,551 PointsWhy does my child theme won't overwrite the original?
I did everything the video says, but with the "albar" theme but it won't change anything on my site. I tried both, the color changing and the comment removal and nothing... any ideas?
1 Answer

Hugo Paz
15,620 PointsHi Jose,
Its no longer recommended to use @import to connect the style from the parent theme with the child theme.
You need to follow these instructions
Jose Estrada
1,551 PointsJose Estrada
1,551 PointsThanks for the reply... I just tried that and didn't worked... I removed the @import and created the functions.php with the code they suggested and nothing happened
Hugo Paz
15,620 PointsHugo Paz
15,620 PointsCan you post your style.css and functions.php code?
Jose Estrada
1,551 PointsJose Estrada
1,551 Points/* Theme Name: Albar Child Theme URI: http://kairaweb.com/theme/albar/ Description: Child theme for the Albar theme Author: Jose Estrada Author URI: http://westgar.com/ Template: albar Version: 1.5.8:894 */
.site-top-bar { background-color: #8D9095; color: #FAFAFA; }
<?php add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' ); function theme_enqueue_styles() { wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
}
Hugo Paz
15,620 PointsHugo Paz
15,620 PointsHi Jose,
Did you activate the child theme in the admin area?
Jose Estrada
1,551 PointsJose Estrada
1,551 PointsHi! yes I did, now this appears:
Fatal error: Call to undefined function kaira_theme_option() in /home/westgarc/public_html/wp-content/themes/albar/header.php on line 9
Hugo Paz
15,620 PointsHugo Paz
15,620 PointsDid you change anything in the original theme?
Jose Estrada
1,551 PointsJose Estrada
1,551 PointsNopes... nothing at all... I'm really puzzled here...
Hugo Paz
15,620 PointsHugo Paz
15,620 PointsTry activating the regular theme. delete the child theme folder and start again.
Jose Estrada
1,551 PointsJose Estrada
1,551 PointsThanks I'll do that, I'll let you know how it goes... I'm gonna do it carefully this time so, maybe tomorrow... Thanks for the help!