Skip to content

Instantly share code, notes, and snippets.

@GaryJones
Created January 31, 2012 00:49
Show Gist options
  • Save GaryJones/1707890 to your computer and use it in GitHub Desktop.
Save GaryJones/1707890 to your computer and use it in GitHub Desktop.
Switch Genesis to XHTML 1.0 Strict doctype
<?php
remove_action( 'genesis_doctype', 'genesis_do_doctype' );
add_action( 'genesis_doctype', 'child_do_doctype' );
/**
* Switch to XHTML 1.0 Strict doctype.
*
* @author Gary Jones
* @link http://code.garyjones.co.uk/modify-doctype/
*/
function child_do_doctype() {
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="<?php bloginfo( 'html_type' ); ?>; charset=<?php bloginfo( 'charset' ); ?>" />
<?php
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment