Monday, July 22, 2013

How to add HTML5 Shim plugin in your WordPress Website

HTML5 Shim emulates HTML5 Form behavior on old browsers, so this plugin will enable HTML5 elements to be able to be styled through CSS in old browsers.

This function keep your header clean and insert HTML5 Shim plugin inside HEAD tag.

// add ie conditional html5 shim to header
function add_ie_html5_shim () {
echo '<!--[if lt IE 9]>';
echo '<script src=""></script>';
echo '<![endif]-->';
add_action('wp_head', 'add_ie_html5_shim');

Note: insert this code in your functions.php file of your current template.
Disqus Comments