sven
12/21/2014 - 4:18 AM

functions.php

<?php
/**
 * Enqueue scripts and styles.
 */
function _s_scripts() {
	wp_enqueue_script( '_s-html5shiv', get_template_directory_uri() . '/js/html5shiv.js', array(), '3.7.2', true );
}
add_action( 'wp_enqueue_scripts', '_s_scripts' );

/**
 * Load only in IE as of WP 4.1
 */
function _s_html5shiv( $tag, $handle, $src ) {
	if ( '_s-html5shiv' === $handle ) {
		$tag = "<!--[if lt IE 9]>\n";
		$tag .= "<script type='text/javascript' src='$src'></script>\n";
		$tag .= "<![endif]-->\n";
	}
	return $tag;
}
add_filter( 'script_loader_tag', '_s_html5shiv', 10, 3 );
<?php
// add ie conditional html5 shim to header
function _s_add_ie_html5_shim () {
    echo '<!--[if lt IE 9]>';
    echo '<script src="' . get_template_directory_uri() . '/js/html5.js"></script>';
    echo '<![endif]-->';
}
add_action('wp_head', '_s_add_ie_html5_shim');