Skip to content

Instantly share code, notes, and snippets.

@anneallen
Created November 6, 2013 18:23
Show Gist options
  • Save anneallen/7341433 to your computer and use it in GitHub Desktop.
Save anneallen/7341433 to your computer and use it in GitHub Desktop.
Add ie selector to html tag
function eva_IE_doctype() {
?>
<!DOCTYPE html>
<!--[if IEMobile 7 ]> <html dir="ltr" lang="en-US"class="no-js iem7"> <![endif]-->
<!--[if lt IE 7 ]> <html dir="ltr" lang="en-US" class="no-js ie6 oldie"> <![endif]-->
<!--[if IE 7 ]> <html dir="ltr" lang="en-US" class="no-js ie7 oldie"> <![endif]-->
<!--[if IE 8 ]> <html dir="ltr" lang="en-US" class="no-js ie8 oldie"> <![endif]-->
<!--[if (gte IE 9)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html <?php language_attributes( 'html' ); ?>><!--<![endif]-->
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<?php
}
remove_action( 'genesis_doctype', 'genesis_do_doctype' );
add_action( 'genesis_doctype', 'eva_IE_doctype' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment