Skip to content

Instantly share code, notes, and snippets.

@wpsmith
Created July 22, 2012 02:57
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save wpsmith/3158061 to your computer and use it in GitHub Desktop.
Save wpsmith/3158061 to your computer and use it in GitHub Desktop.
Add IE conditional html5 shim to header
<?php
add_action( 'wp_head', 'wps_add_ie_html5_shim' );
/**
* Add IE conditional html5 shim to header
*/
function wps_add_ie_html5_shim() {
global $is_IE;
if ( $is_IE ) {
echo '<!--[if lt IE 9]>';
echo '<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>';
echo '<![endif]-->';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment