Created
July 11, 2013 21:49
-
-
Save hereswhatidid/5979556 to your computer and use it in GitHub Desktop.
Add an IE conditional requirement to an registered style in WordPress
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ( !is_admin() ) { | |
$theme = get_theme( get_current_theme() ); | |
wp_register_style( 'your-style', get_bloginfo( 'stylesheet_directory' ) . '/css/ie.css', false, $theme['Version'] ); | |
$GLOBALS['wp_styles']->add_data( 'your-style', 'conditional', 'lte IE 8' ); | |
wp_enqueue_style( 'your-style' ); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment