-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathheader.php
56 lines (51 loc) · 2.34 KB
/
header.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
/**
* @package WordPress
* @subpackage Yoko
*/
?><!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<title><?php wp_title( '|', true, 'right' ); ?></title>
<link rel="profile" href="http://gmpg.org/xfn/11">
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
<!--[if lt IE 9]>
<script src="<?php echo get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script>
<![endif]-->
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<div id="page" class="clearfix">
<header id="branding">
<nav id="mainnav" class="clearfix">
<?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>
</nav><!-- end mainnav -->
<?php global $yoko_options;
$yoko_settings = get_option( 'yoko_options', $yoko_options ); ?>
<hgroup id="site-title">
<?php if( $yoko_settings['custom_logo'] ) : ?>
<a href="<?php echo home_url( '/' ); ?>" class="logo"><img src="<?php echo $yoko_settings['custom_logo']; ?>" alt="<?php bloginfo('name'); ?>" /></a>
<?php else : ?>
<h1><a href="<?php echo home_url( '/' ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>"><?php bloginfo( 'name' ); ?></a></h1>
<h2 id="site-description"><?php bloginfo( 'description' ); ?></h2>
<?php endif; ?>
</hgroup><!-- end site-title -->
<?php
// The header image
// Check if this is a post or page, if it has a thumbnail, and if it's a big one
if ( is_singular() &&
has_post_thumbnail( $post->ID ) &&
( $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'post-thumbnail' ) ) &&
$image[1] >= get_custom_header()->width ) : ?>
<?php echo get_the_post_thumbnail( $post->ID , array(1102,350), array('class' => 'headerimage')); ?>
<?php elseif ( get_header_image() ) : ?>
<img alt="" src="<?php header_image(); ?>" class="headerimage" width="<?php echo absint( get_custom_header()->width ); ?>" height="<?php echo absint( get_custom_header()->height ); ?>">
<?php endif; ?>
<nav id="subnav">
<?php
if (is_nav_menu( 'Sub Menu' ) ) {
wp_nav_menu( array('menu' => 'Sub Menu' ));} ?>
</nav><!-- end subnav -->
</header><!-- end header -->