Hey guys,
This something i put together to in my functions.php for enqueuing an IE stylesheet only when wordpress detects that the user is on IE.
I saw that there was an IE global variable so I tried to make use of that. I'm not getting any errors when I run this, buts its not enqueuing the stylesheet as I hoped. Anyone have any idea what the problem is?
thanks for any help
$bloginfo = get_bloginfo('template_url');
if ( !function_exists( 'StyleLoader' ) ) {
function StyleLoader( $bloginfo ) {
if ( !is_admin() ) {
global $is_IE;
if ( $is_IE ) {
wp_register_style('ieStyle', $bloginfo . '/css/ieStyle.css', array(), '1.0', 'screen');
wp_enqueue_style('ieStyle');
}
}
}
}
add_action('wp_head', 'StyleLoader');