Posted By

mindshare on 03/10/11


Tagged

wordpress html5


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

wirenaught
prismatiq
hkamci


HTML5 header.php WordPress Theme Modifications


 / Published in: PHP
 

HTML5 replacements for the doctype, etc. for WorPress themes. Add this code to your header.php file and you site will use HTML5. Be sure to double check the rest of your theme files for validation errors.

  1. <!DOCTYPE HTML>
  2. <html <?php language_attributes(); ?>>
  3. <head>
  4. <meta charset="<?php bloginfo('charset'); ?>" />
  5. <!--[if lt IE 9]>
  6. <script type="text/javascript" src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
  7. <![endif]-->
  8. <style type="text/css">
  9. /* HTML5-specific CSS setup */
  10. article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section { display:block }
  11. </style>

Report this snippet  

You need to login to post a comment.