Skip to content

Instantly share code, notes, and snippets.

@tomfinitely
Created June 3, 2014 15:31
Show Gist options
  • Save tomfinitely/65bbd2dc0a660a06b5e7 to your computer and use it in GitHub Desktop.
Save tomfinitely/65bbd2dc0a660a06b5e7 to your computer and use it in GitHub Desktop.
Genesis 2.0 Conditional CSS for Internet Explorers 7 & 8
//* Conditional CSS
add_action( 'wp_enqueue_scripts', 'child_add_ie8_style_sheet', 200 );
function child_add_ie8_style_sheet() {
global $wp_styles;
wp_enqueue_style( 'child-ie8', get_stylesheet_directory_uri() . '/style-ie8.css', array(), '1.0' );
$wp_styles->add_data( 'child-ie8', 'conditional', 'lte IE 8' );
}
add_action( 'wp_enqueue_scripts', 'child_add_ie7_style_sheet', 200 );
function child_add_ie7_style_sheet() {
global $wp_styles;
wp_enqueue_style( 'child-ie7', get_stylesheet_directory_uri() . '/style-ie7.css', array(), '1.0' );
$wp_styles->add_data( 'child-ie7', 'conditional', 'lte IE 7' );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment