Skip to content

Instantly share code, notes, and snippets.

@anneallen
Created September 25, 2013 18:22
Show Gist options
  • Save anneallen/6703795 to your computer and use it in GitHub Desktop.
Save anneallen/6703795 to your computer and use it in GitHub Desktop.
/** Conditional html element classes for Genesis HTML 5 as per Paul Irish method
/** Conditional html element classes for HTML 5 */
remove_action( 'genesis_doctype', 'genesis_do_doctype' );
add_action( 'genesis_doctype', 'child_do_doctype' );
function child_do_doctype() {
?>
<!DOCTYPE html>
<!--[if lt IE 7 ]> <html class="ie6" <?php language_attributes( 'html' ); ?>> <![endif]-->
<!--[if IE 7 ]> <html class="ie7" <?php language_attributes( 'html' ); ?>> <![endif]-->
<!--[if IE 8 ]> <html class="ie8" <?php language_attributes( 'html' ); ?>> <![endif]-->
<!--[if IE 9 ]> <html class="ie9" <?php language_attributes( 'html' ); ?>> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html class="" <?php language_attributes( 'html' ); ?>> <!--<![endif]-->
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<?php
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment