-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathheader.php
More file actions
245 lines (183 loc) · 7.14 KB
/
header.php
File metadata and controls
245 lines (183 loc) · 7.14 KB
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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
<?php
/**
* The Header for our theme.
* Displays all of the <head> section and everything up till <div id="wrap">
*
* @package Portfolio
* @since Portfolio Lite 1.0
*/
?><!DOCTYPE html>
<html class="no-js" <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="profile" href="http://gmpg.org/xfn/11">
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<?php wp_body_open(); ?>
<?php $header_image = get_header_image(); ?>
<?php $blog = is_home(); ?>
<!-- BEGIN #wrapper -->
<div id="wrapper">
<!-- BEGIN #header -->
<div id="header" class="top-header">
<?php if ( has_custom_logo() ) { ?>
<div class="site-logo"><?php the_custom_logo(); ?></div>
<?php } ?>
<!-- BEGIN .top-navigation -->
<div class="top-navigation">
<?php if ( has_nav_menu( 'social-menu' ) ) { ?>
<?php
wp_nav_menu(
array(
'theme_location' => 'social-menu',
'title_li' => '',
'depth' => 1,
'container_class' => 'social-menu',
'menu_class' => 'social-icons',
'link_before' => '<span>',
'link_after' => '</span>',
)
);
?>
<?php } ?>
<a id="menu-toggle" class="menu-toggle" href="#sidr">
<span class="screen-reader-text"><?php esc_html_e( 'Toggle Side Menu', 'portfolio-lite' ); ?></span>
<svg class="icon-menu-open" version="1.1" id="icon-open" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
<rect y="2" width="24" height="2"/>
<rect y="11" width="24" height="2"/>
<rect y="20" width="24" height="2"/>
</svg>
<svg class="icon-menu-close" version="1.1" id="icon-close" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
<rect x="0" y="11" transform="matrix(-0.7071 -0.7071 0.7071 -0.7071 12 28.9706)" width="24" height="2"/>
<rect x="0" y="11" transform="matrix(-0.7071 0.7071 -0.7071 -0.7071 28.9706 12)" width="24" height="2"/>
</svg>
</a>
<!-- END .top-navigation -->
</div>
<!-- END #header -->
</div>
<!-- BEGIN #panel -->
<main id="panel" class="container clearfix">
<!-- BEGIN .four columns -->
<div id="header" class="four columns side-header">
<?php if ( has_custom_logo() && ! is_single() ) { ?>
<div class="site-logo"><?php the_custom_logo(); ?></div>
<?php } ?>
<?php if ( wp_is_mobile() && has_nav_menu( 'mobile-menu' ) ) { ?>
<!-- BEGIN #navigation -->
<nav id="navigation" class="navigation-main" role="navigation" aria-label="<?php esc_attr_e( 'Primary Navigation', 'portfolio-lite' ); ?>">
<?php
wp_nav_menu(
array(
'theme_location' => 'mobile-menu',
'title_li' => '',
'depth' => 2,
'fallback_cb' => 'wp_page_menu',
'container' => false,
'menu_class' => 'menu',
'link_before' => '<span role="menuitem">',
'link_after' => '</span>',
)
);
?>
<!-- END #navigation -->
</nav>
<?php } elseif ( has_nav_menu( 'main-menu' ) ) { ?>
<!-- BEGIN #navigation -->
<nav id="navigation" class="navigation-main" role="navigation" aria-label="<?php esc_attr_e( 'Primary Navigation', 'portfolio-lite' ); ?>">
<?php
wp_nav_menu( array(
'theme_location' => 'main-menu',
'title_li' => '',
'depth' => 2,
'fallback_cb' => 'wp_page_menu',
'container' => false,
'menu_class' => 'menu',
'link_before' => '<span role="menuitem">',
'link_after' => '</span>',
) );
?>
<!-- END #navigation -->
</nav>
<?php } ?>
<!-- END .four columns -->
</div>
<?php if ( ! is_single() ) { ?>
<!-- BEGIN .twelve columns -->
<div class="twelve columns">
<!-- BEGIN #masthead -->
<div id="masthead">
<?php if ( is_page_template( 'template-slideshow-gallery.php' ) || is_page_template( 'template-blog.php' ) ) { ?>
<div class="site-title-slideshow">
<p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php echo wp_kses_post( get_bloginfo( 'name' ) ); ?></a></p>
<h1 class="title"><?php the_title(); ?></h1>
</div>
<?php } elseif ( is_front_page() && is_home() ) { ?>
<h1 class="site-title">
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php echo wp_kses_post( get_bloginfo( 'name' ) ); ?></a>
</h1>
<?php } else { ?>
<p class="site-title">
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php echo wp_kses_post( get_bloginfo( 'name' ) ); ?></a>
</p>
<?php } ?>
<p class="site-description">
<?php echo wp_kses_post( get_bloginfo( 'description' ) ); ?>
</p>
<!-- END #masthead -->
</div>
<?php if ( $blog && ! empty( $header_image ) || is_category() && ! empty( $header_image ) || is_search() && ! empty( $header_image ) || is_archive() && ! empty( $header_image ) ) { ?>
<div id="custom-header" class="bg-img" style="background-image: url(<?php header_image(); ?>);">
<img class='img-hide' src="<?php header_image(); ?>" height="<?php echo esc_attr( get_custom_header()->height ); ?>" width="<?php echo esc_attr( get_custom_header()->width ); ?>" alt="<?php echo esc_attr( get_bloginfo() ); ?>" />
</div>
<?php } ?>
<?php } elseif ( is_single() && ( has_post_thumbnail() || ! empty( $header_image ) ) ) { ?>
<!-- BEGIN .row -->
<div class="row">
<!-- BEGIN .ten columns -->
<div class="ten columns">
<!-- BEGIN #masthead -->
<div id="masthead">
<?php if ( is_front_page() && is_home() ) { ?>
<h1 class="site-title">
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php echo wp_kses_post( get_bloginfo( 'name' ) ); ?></a>
</h1>
<?php } else { ?>
<p class="site-title">
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php echo wp_kses_post( get_bloginfo( 'name' ) ); ?></a>
</p>
<?php } ?>
<p class="site-description">
<?php echo wp_kses_post( get_bloginfo( 'description' ) ); ?>
</p>
<!-- END #masthead -->
</div>
<!-- END .ten columns -->
</div>
<!-- END .row -->
</div>
<?php } else { ?>
<!-- BEGIN .row -->
<div class="row">
<!-- BEGIN #masthead -->
<div id="masthead" class="full-width">
<?php if ( is_front_page() && is_home() ) { ?>
<h1 class="site-title">
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php echo wp_kses_post( get_bloginfo( 'name' ) ); ?></a>
</h1>
<?php } else { ?>
<p class="site-title">
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php echo wp_kses_post( get_bloginfo( 'name' ) ); ?></a>
</p>
<?php } ?>
<p class="site-description">
<?php echo wp_kses_post( get_bloginfo( 'description' ) ); ?>
</p>
<!-- END #masthead -->
</div>
<!-- END .row -->
</div>
<?php } ?>