-
Notifications
You must be signed in to change notification settings - Fork 89
/
header.php
163 lines (142 loc) · 6.14 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<?php
/**
* The Header for our theme.
*
* Displays all of the <head> section and everything up till <div id="main">
*/
?><!DOCTYPE html>
<!--[if lt IE 7]> <html <?php language_attributes(); ?> class="no-js ie6"> <![endif]-->
<!--[if IE 7]> <html <?php language_attributes(); ?> class="no-js ie7"> <![endif]-->
<!--[if IE 8]> <html <?php language_attributes(); ?> class="no-js ie8"> <![endif]-->
<!--[if IE 9]> <html <?php language_attributes(); ?> class="no-js ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html <?php language_attributes(); ?> class="no-js"> <!--<![endif]-->
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title><?php
/*
* Print the <title> tag based on what is being viewed.
*/
global $page, $paged;
wp_title( '|', true, 'right' );
// Add the blog name.
bloginfo( 'name' );
// Add the blog description for the home/front page.
$site_description = get_bloginfo( 'description', 'display' );
if ( $site_description && ( is_home() || is_front_page() ) )
echo " | $site_description";
// Add a page number if necessary:
if ( $paged >= 2 || $page >= 2 )
echo ' | ' . 'Page ' . max( $paged, $page );
?></title>
<link rel="profile" href="http://gmpg.org/xfn/11" />
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
<?php
wp_enqueue_style( 'argo-stylesheet', get_bloginfo( 'stylesheet_url' ) );
wp_enqueue_script( 'argo-modernizr', get_template_directory_uri() . '/js/modernizr.custom.55609.js' );
/* We add some JavaScript to pages with the comment form
* to support sites with threaded comments (when in use).
*/
if ( is_singular() && get_option( 'thread_comments' ) )
wp_enqueue_script( 'comment-reply' );
/* Always have wp_head() just before the closing </head>
* tag of your theme, or you will break many plugins, which
* generally use this hook to add elements to <head> such
* as styles, scripts, and meta tags.
*/
wp_head();
?>
</head>
<body <?php body_class(); ?>>
<div id="page" class="hfeed">
<div class="global-nav-bg">
<div class="global-nav">
<nav>
<span class="visuallyhidden">
<a href="#main" title="Skip to content">Skip to content</a>
</span>
<?php wp_nav_menu( array( 'theme_location' => 'global-nav', 'container' => false, 'depth' => 1 ) ); ?>
</nav>
</div>
<!-- /.global-nav -->
</div> <!-- /.global-nav-bg -->
<div id="header"><header>
<div class="container_12 clearfix">
<?php
$header_image = get_header_image();
// Has the text been hidden?
if ( 'blank' == get_header_textcolor() || '' == get_header_textcolor()):
$style = ' style="display:none;"';
?>
<div id="branding" class="grid_6">
<?php
// Has the header image been hidden?
elseif ( ! $header_image ) :
?>
<div id="branding" class="grid_6">
<?php
else :
$style = ' style="color:#' . get_theme_mod( 'header_textcolor', HEADER_TEXTCOLOR ) . ';"';
?>
<div id="branding" class="grid_6 brand-image">
<?php endif; ?>
<?php $heading_tag = ( is_home() || is_front_page() ) ? 'h1' : 'h2'; ?>
<<?php echo $heading_tag; ?> id="site-title" <?php echo $style; ?>>
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home">
<?php bloginfo('name'); ?>
</a>
</<?php echo $heading_tag; ?>>
<h2 id="site-description" <?php echo $style; ?>><?php bloginfo('description'); ?></h2>
<?php
// Check to see if the header image should be displayed
if ( $header_image ) :
?>
<a href="<?php echo esc_url( home_url( '/' ) ); ?>">
<img src="<?php header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="<?php esc_attr( get_bloginfo( 'name', 'display' ) ); ?>">
</a>
<?php endif; ?>
</div><!-- end .grid_6 -->
<div class="grid_6 featured-posts">
<?php $featured = argo_get_featured_posts();
$slot = 1;
while ( $featured->have_posts() ) : $featured->the_post(); ?>
<div id="feature<?php echo $slot; ?>" class="features">
<a href="<?php the_permalink(); ?>" title="headline">
<?php the_post_thumbnail(); ?></a>
<h3 class="features-caption unitPng"><a href="<?php the_permalink(); ?>" title="headline"><?php the_title(); ?></a></h3>
</div>
<?php
$slot++;
endwhile;
wp_reset_postdata();
?>
</div> <!-- end .grid_6 -->
</div> <!--/ .container_12 -->
</header></div>
<!-- ============= / #header ============= -->
<div id="main-nav">
<nav>
<?php wp_nav_menu( array( 'theme_location' => 'categories', 'container' => false , 'menu_id' => 'topnav', 'walker' => new Argo_Categories_Walker, 'depth' => 1 ) ); ?>
</nav><!-- /#main-nav -->
<nav id="utility-nav">
<div id="header-search">
<?php get_search_form(); ?>
</div>
<ul id="follow-us">
<?php if ( $facebook = get_option( 'facebook_link' ) ) : ?>
<li class="icon-fb-header"><a href="<?php echo esc_url( $facebook ); ?>" title="Facebook">Facebook</a></li>
<?php endif; ?>
<?php if ( $twitter = get_option( 'twitter_link' ) ) : ?>
<li class="icon-twitter-header"><a href="<?php echo esc_url( $twitter ); ?>" title="Twitter">Twitter</a></li>
<?php endif; unset( $facebook, $twitter ); ?>
</ul> <!-- /#follow-us -->
</nav> <!-- /utility-nav -->
</div> <!-- /main-nav -->
<div id="secondary-nav" class="container_12 clearfix">
<nav>
<div id="topics-bar" class="grid_12">
<?php wp_nav_menu( array( 'theme_location' => 'dont-miss', 'container' => false, 'depth' => 1 ) ); ?>
</div> <!--/.grid_12-->
</nav>
</div><!--/.container_12-->
<div id="main" class="container_12 clearfix">