title: Enqueueing IE conditional stylesheets in WordPress the right way
body: <p>I know this question has been asked before on stackoverflow, but for the life of me I cannot get my conditional stylesheet to load and work for all versions of IE. I appreciate any help given in advance, it's really been getting to me, and I'm not sure what to do from here. I also tried loading the IE stylesheet in the header but that didn't seem to work either. My theme is not a child theme.</p>
  
  <p>Here's my functions code:</p>
  
  <pre><code>function theme_styles() {
  
  global $wp_styles;
  
  wp_enqueue_style( 'bootstrap_css', get_template_directory_uri() . '/css/bootstrap.min.css' );
  wp_enqueue_style( 'glyphicons_css', get_template_directory_uri() . '/css/glyphicons.css' );
  wp_enqueue_style( 'glyphiconssocial_css', get_template_directory_uri() . '/css/social.css' );
  wp_enqueue_style( 'main_css', get_template_directory_uri() . '/style.css' );
  
      /**
   * Load our IE-only stylesheet for all versions of IE:
   * &lt;!--[if IE]&gt; ... &lt;![endif]--&gt;
   * 
   * NOTE: It is also possible to just check and see if the $is_IE global in WordPress is set to true before 
   * calling the wp_enqueue_style() function.  If you are trying to load a stylesheet for all browsers 
   * EXCEPT for IE, then you would HAVE to check the $is_IE global since WordPress doesn't have a way to 
   * properly handle non-IE conditional comments.
   */
  wp_enqueue_style( 'ie_css', get_template_directory_uri() . '/ie.css', array('bootstrap_css', 'main_css')  );
  $wp_styles-&gt;add_data( 'ie_css', 'conditional', 'IE' );
  
  
  } add_action( 'wp_enqueue_scripts', 'theme_styles' );    
  </code></pre>