Free Photos
WordPress Themes

Add conditional links for Internet Explorer CSS in WordPress

<?php // Add this in your 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 something like: * * <!--[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]--> * */

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.