Skip to content

Instantly share code, notes, and snippets.

@jbutko
Forked from stevegrunwell/gist:2140325
Last active December 17, 2015 18:19
Show Gist options
  • Save jbutko/5652532 to your computer and use it in GitHub Desktop.
Save jbutko/5652532 to your computer and use it in GitHub Desktop.
PHP, WP, function.php: Conditional style.css register in function.php
<?php
wp_enqueue_style('ie7-fixes', get_bloginfo('template_url') . '/css/ie7.css', false, '', 'screen');
global $wp_styles;
$wp_styles->add_data('ie7-fixes', 'conditional', 'lte IE 7');
?>
alternativa:
wp_enqueue_style(
'ie7-style',
get_template_directory_uri() . '/style-ie.css'
);
global $wp_styles;
$wp_styles->add_data( 'ie7-style', 'conditional', 'lte IE 9' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment