HTML and CSS Reference
When registering CSS using the register and enqueue functions, conditional comments are a
little more complex. WordPress uses the object $wp_styles to store registered style sheets.
To wrap your file in conditional comments, add extra information to this object.
For Internet Explorer 8 and below, excluding mobile IE, we need to register another copy of
our desktop style sheet (using the media type all ) and wrap it in conditional comments.
In the code sample above, /**keepreading**/ would be replaced with the following:
global $wp_styles ;
array ( 'theme-mobile' ),
$wp_styles -& gt ; add_data (
'theme-desktop-ie' , //handle
'conditional' , //is a conditional comment
'!(IEMobile)&(lte IE 8)' //the conditional comment
header.php or footer.php in the theme. Alternatively, you could use the wp_head or wp_footer
Outputting The Style Sheet HTML
enqueue function and run it on the wp_print_styles hook.