Skip to content

Instantly share code, notes, and snippets.

@jbutko
Created January 5, 2014 19:56
Show Gist options
  • Save jbutko/8272965 to your computer and use it in GitHub Desktop.
Save jbutko/8272965 to your computer and use it in GitHub Desktop.
HTML5, WP, functions.php: HTML5 Shim in functions.php
// add ie conditional html5 shim to header
function 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]-->';
}
add_action('wp_head', 'add_ie_html5_shim');
// From http://css-tricks.com/snippets/wordpress/html5-shim-in-functions-php/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment