a6951d77f3
* Add custom header support * header.php: use `get_stylesheet_uri()` to load stylesheet, props Mamaduka * Add full-width template, including adding relevant body_class value as a CSS hook * Hide sidebar on all views if no active widgets exist * Fix site title output (was missing site title) * Remove "featured" title for sticky posts * Add content template files for aside, image, link, and quote post formats * Indent content-single.php to match content.php * Remove sample JPG since Twenty Twelve ships with no default header images ... and style updates, props drewstrojny * Better footer styles * Styling for full-width layouts * Add basic styles for archive views * Refine post header/footer styles a bit git-svn-id: https://develop.svn.wordpress.org/trunk@19915 602fd350-edb4-49c9-b593-d223f7449a82
56 lines
2.3 KiB
PHP
56 lines
2.3 KiB
PHP
<?php
|
|
/**
|
|
* The Header for our theme.
|
|
*
|
|
* Displays all of the <head> section and everything up till <div id="main">
|
|
*
|
|
* @package WordPress
|
|
* @subpackage Twenty_Twelve
|
|
* @since Twenty Twelve 1.0
|
|
*/
|
|
?><!DOCTYPE html>
|
|
<html <?php language_attributes(); ?>>
|
|
<head>
|
|
<meta charset="<?php bloginfo( 'charset' ); ?>" />
|
|
<meta name="viewport" content="width=device-width" />
|
|
<title><?php wp_title( '|', true, 'right' ); ?> <?php bloginfo( 'name' ); ?></title>
|
|
<link rel="profile" href="http://gmpg.org/xfn/11" />
|
|
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
|
|
|
|
<!-- Google fonts static for now -->
|
|
<link href="http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,400,300,600,700" rel="stylesheet" type="text/css">
|
|
|
|
<!--[if lt IE 9]>
|
|
<script src="<?php echo get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script>
|
|
<![endif]-->
|
|
<?php
|
|
if ( is_singular() && get_option( 'thread_comments' ) )
|
|
wp_enqueue_script( 'comment-reply' );
|
|
|
|
wp_enqueue_style( 'twentytwelve-style', get_stylesheet_uri() );
|
|
?>
|
|
<?php wp_head(); ?>
|
|
</head>
|
|
|
|
<body <?php body_class(); ?>>
|
|
<div id="page" class="hfeed">
|
|
<header id="masthead" role="banner">
|
|
<hgroup>
|
|
<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
|
|
<h2 class="site-description"><?php bloginfo( 'description' ); ?></h2>
|
|
</hgroup>
|
|
|
|
<nav class="site-navigation" role="navigation">
|
|
<h3 class="assistive-text"><?php _e( 'Main menu', 'twentytwelve' ); ?></h3>
|
|
<div class="skip-link"><a class="assistive-text" href="#content" title="<?php esc_attr_e( 'Skip to primary content', 'twentytwelve' ); ?>"><?php _e( 'Skip to primary content', 'twentytwelve' ); ?></a></div>
|
|
<div class="skip-link"><a class="assistive-text" href="#secondary" title="<?php esc_attr_e( 'Skip to secondary content', 'twentytwelve' ); ?>"><?php _e( 'Skip to secondary content', 'twentytwelve' ); ?></a></div>
|
|
<?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>
|
|
</nav>
|
|
|
|
<?php $header_image = get_header_image();
|
|
if ( ! empty( $header_image ) ) : ?>
|
|
<img src="<?php echo esc_url( $header_image ); ?>" alt="" />
|
|
<?php endif; ?>
|
|
</header><!-- #masthead -->
|
|
|
|
<div id="main">
|