Skip to content

Instantly share code, notes, and snippets.

@brycejacobson
Created August 23, 2013 17:06
Show Gist options
  • Save brycejacobson/6321669 to your computer and use it in GitHub Desktop.
Save brycejacobson/6321669 to your computer and use it in GitHub Desktop.
Add Conditional Classes to the HTML Tag in Genesis 2.0
<?php
//* Do NOT include the opening php tag
//* Remove the default Genesis doctype, add new html5 doctype with IE8 detection
function mb_html5_doctype() {
?>
<!DOCTYPE html>
<!--[if IE 8]> <html class="lt-ie9" <?php language_attributes( 'html' ); ?>> <![endif]-->
<!--[if gt IE 8]><!--> <html <?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