/ Published in: PHP

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
How to add conditional comments to enqueued/registered styles for IE. In functions.php: wp_enqueue_style('internet-explorer', 'path/to/ie.css', false, '1.0', 'screen'); $wp_styles->add_data( 'internet-explorer', 'conditional', 'lt IE 7' ); // or lt IE 6 or lt IE 8 or whatever. This will result in: <!--[if lt IE 7]> <link rel='stylesheet' id='internet-explorer-css' href='path/to/ie6.css?ver=1.0' type='text/css' media='screen' /> <![endif]--> Example: $wp_styles->add_data( 'ie', 'conditional', 'lt IE 7' ); // or lt IE 6 or lt IE 8 or whatever.
Comments
