forked from jchristopher/Franklin-Street-Theme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
header.php
executable file
·80 lines (76 loc) · 2.71 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<?php
/**
* @package Frank
*/
?>
<!DOCTYPE html>
<!--[if IE 7 | IE 8]>
<html class="ie" lang="en-US">
<![endif]-->
<!--[if (gte IE 9) | !(IE)]><!-->
<html <?php language_attributes(); ?>>
<!--<![endif]-->
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<meta name="viewport" content="width=device-width" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<title>
<?php
wp_title( '—', true, 'right' );
bloginfo( 'name' );
?>
</title>
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
<?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?>
<?php wp_head(); ?>
</head>
<body id="page" <?php body_class(); ?>>
<!--[if lt IE 9]>
<div class="chromeframe">Your browser is out of date. Please <a href="http://browsehappy.com/">upgrade your browser </a> or <a href="http://www.google.com/chromeframe/?redirect=true">install Google Chrome Frame</a>.</div>
<![endif]-->
<div class="container">
<header id="page-header" class="row">
<hgroup id="site-title-description">
<h1 id="site-title"><a href="<?php echo home_url(); ?>"><?php bloginfo( 'name' ); ?></a></h1>
<h2 id="site-description"><?php bloginfo( 'description' ); ?></h2>
</hgroup>
<?php
$header_image = get_header_image();
if ( $header_image ) :
if ( function_exists( 'get_custom_header' ) ) {
$header_image_width = get_theme_support( 'custom-header', 'width' );
} else {
$header_image_width = HEADER_IMAGE_WIDTH;
}
?>
<a href="<?php echo esc_url( home_url( '/' ) ); ?>">
<?php
if ( is_singular() && has_post_thumbnail( $post->ID ) &&
( $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), array( $header_image_width, $header_image_width ) ) ) &&
$image[1] >= $header_image_width ) :
echo get_the_post_thumbnail( $post->ID, 'post-thumbnail' );
else :
if ( function_exists( 'get_custom_header' ) ) {
$header_image_width = get_custom_header()->width;
$header_image_height = get_custom_header()->height;
} else {
$header_image_width = HEADER_IMAGE_WIDTH;
$header_image_height = HEADER_IMAGE_HEIGHT;
}
?>
<img src="<?php header_image(); ?>" width="<?php echo $header_image_width; ?>" height="<?php echo $header_image_height; ?>" alt="" />
<?php endif; ?>
</a>
<?php endif; ?>
<nav id="site-nav">
<?php if ( !dynamic_sidebar( 'Navigation' ) ) : ?>
<?php wp_nav_menu( array( 'theme_location' => 'frank_primary_navigation', 'container' => false ) ); ?>
<?php endif; ?>
</nav>
<?php if ( is_active_sidebar( 'widget-subheader' ) ) : ?>
<div id='sub-header' class='row'>
<?php if ( !dynamic_sidebar( 'Sub Header' ) ) : ?>
<?php endif; ?>
</div>
<?php endif; ?>
</header>