Skip to content

Instantly share code, notes, and snippets.

@jlittlejohn
Created September 17, 2012 01:08
Show Gist options
  • Save jlittlejohn/3735066 to your computer and use it in GitHub Desktop.
Save jlittlejohn/3735066 to your computer and use it in GitHub Desktop.
WP: header.php (The Works)
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" <?php language_attributes(); ?>> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" <?php language_attributes(); ?>> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9" <?php language_attributes(); ?>> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" <?php language_attributes(); ?>> <!--<![endif]-->
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title><?php wp_title( '|', true, 'right' ); ?> <?php $site_title = get_bloginfo('name'); ?><?php echo get_bloginfo ('name'); ?></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<!-- Include humans.txt -->
<link rel="author" href="<?php bloginfo( 'template_directory' );?>/humans.txt">
<link rel="profile" href="http://gmpg.org/xfn/11">
<link rel="pingback" href="<?php bloginfo( 'pingback_directory' ); ?>">
<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS2 Feed" href="<?php bloginfo('rss2_url'); ?>">
<?php
if ( is_singular() && get_option( 'thread_comments' ) )
wp_enqueue_script( 'comment-reply' );
wp_head();
?>
<!-- Touch icons -->
<link rel="author" href="<?php bloginfo( 'template_directory' );?>/humans.txt">
<link rel="apple-touch-icon" sizes="144x144" href="<?php echo get_template_directory_uri() ?>/img/ico/apple-touch-icon-144x144.png">
<link rel="apple-touch-icon" sizes="114x114" href="<?php echo get_template_directory_uri() ?>/img/ico/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" sizes="72x72" href="<?php echo get_template_directory_uri() ?>/img/ico/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" href="<?php echo get_template_directory_uri() ?>/img/ico/apple-touch-icon.png">
<link rel="shortcut icon" href="<?php echo get_template_directory_uri() ?>/img/ico/favicon.ico">
<!-- Include startup image code -->
<!-- iPhone - portrait (320x460) -->
<link rel="apple-touch-startup-image" href="<?php echo get_template_directory_uri() ?>/img/iphone.png" media="screen and (min-device-width: 200px) and (max-device-width: 320px) and (orientation:portrait)">
<!-- iPad - portrait (768x1004) -->
<link rel="apple-touch-startup-image" href="<?php echo get_template_directory_uri() ?>/img/ipad-portrait.png" media="screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation:portrait)">
<!-- iPad - landscape (1024x748) -->
<link rel="apple-touch-startup-image" href="<?php echo get_template_directory_uri() ?>/img/ipad-landscape.png" media="screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation:landscape)">
<!-- iPhone Retina - portrait (640x920) -->
<link rel="apple-touch-startup-image" sizes="640x920" href="<?php echo get_template_directory_uri() ?>/img/[email protected]">
<!-- iPad Retina - portrait (1536x2008) -->
<link rel="apple-touch-startup-image" sizes="1536x2008" href="<?php echo get_template_directory_uri() ?>/img/[email protected]">
<!-- iPad Retina - landscape (2048x1496) -->
<link rel="apple-touch-startup-image" sizes="2048x1496" href="<?php echo get_template_directory_uri() ?>/img/[email protected]">
<!-- Include facebook open graph code -->
<link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>">
<!--[if lt IE 9]><script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
<?php if(is_user_logged_in()) { ?>
<style type="text/css"> #above {top: 28px;}</style>
<?php } ?>
</head>
<body <?php body_class(); ?>>
<!-- Prompt IE 6-8 users to install Chrome Frame. chromium.org/developers/how-tos/chrome-frame-getting-started -->
<!--[if lt IE 9]><p class=chromeframe>Your browser is getting old. Better put the ol girl down and <a href="http://browsehappy.com/">upgrade to a different browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">install Google Chrome Frame</a> to experience this site.</p><![endif]-->
<noscript>
<p>This website requires JavaScript. In reality, the whole web requires JavaScript and it's time you admit that to yourself.</p>
</noscript>
<header role="banner">
<nav role="navigation">
</nav>
</header>
<div id="main">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment