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

Aaron Harsha
Aaron Harsha
4,337 Points

Child Theme CSS and IE

The style sheet from my child theme works fine in Chrome and Firefox. However, none of the changes I make on the Child Theme's style sheet are being rendered by any version of IE. It will render fine if I make the change to the parent theme but that kinda defeats the whole purpose of a child theme.

What change do I need to do to make it work on IE? I had to add the following to the child theme's functions.php just to get the changes to take effect in Chrome and Firefox :

add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
function theme_enqueue_styles() {
    wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
    wp_enqueue_style( 'child-style', get_stylesheet_uri(), array( 'parent-style' ) );
}

2 Answers

Jeff Jacobson-Swartfager
Jeff Jacobson-Swartfager
15,419 Points

IE can sometimes be a bit stubborn to load new style sheets if you haven't set up cache expiration. To get around setting this up, you can just make sure to clear IE's cache.

Aaron Harsha
Aaron Harsha
4,337 Points

That was the first thing that I had tried when it did not work. If I make changes to the core files, it shows. IE just isn't rendering the child theme CSS.