Skip to content

Instantly share code, notes, and snippets.

@mrosenberg
Last active January 20, 2017 14:59
Show Gist options
  • Save mrosenberg/f21d54a59fe2ab69cec7c2917bbaccef to your computer and use it in GitHub Desktop.
Save mrosenberg/f21d54a59fe2ab69cec7c2917bbaccef to your computer and use it in GitHub Desktop.
Replace doctype in Genesis powered WordPress child themes
add_action( 'genesis_doctype', 'prefix_do_doctype' );
function prefix_do_doctype() {
?><!DOCTYPE html>
<html class="no-js" <?php language_attributes( 'html' ); ?>>
<head <?php echo genesis_attr( 'head' ); ?>>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<?php
}
add_action( 'after_setup_theme', 'prefix_remove_doctype' );
function prefix_remove_doctype() {
remove_action( 'genesis_doctype', 'genesis_do_doctype' );
}
/*
* Let's Roll
*
*/
document.documentElement.className = 'js';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment