HTML5 Shim in functions.php

0
0

Might as well keep your header.php clean and insert the shim from the functions.php file.

// add ie conditional html5 shim to header
function add_ie_html5_shim () {
    echo '<!--[if lt IE 9]>';
    echo 'http://html5shim.googlecode.com/svn/trunk/html5.js';
    echo '<![endif]-->';
}
add_action('wp_head', 'add_ie_html5_shim');

The shim is to enable HTML5 elements to be able to be styled through CSS in Internet Explorer versions less than 9.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.