-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathheader.php
More file actions
177 lines (116 loc) · 4.4 KB
/
header.php
File metadata and controls
177 lines (116 loc) · 4.4 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
<!DOCTYPE html>
<html class="no-js" <?php language_attributes(); ?>>
<head>
<meta http-equiv="content-type" content="<?php bloginfo( 'html_type' ); ?>" charset="<?php bloginfo( 'charset' ); ?>" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" >
<link rel="profile" href="http://gmpg.org/xfn/11">
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<?php
if ( function_exists( 'wp_body_open' ) ) {
wp_body_open();
}
?>
<a class="faux-button skip-link" href="#site-content"><?php _e( 'Skip to the content', 'miyazaki' ); ?></a>
<header id="site-header">
<div class="section-inner">
<div class="header-left">
<?php
$has_logo = ( function_exists( 'the_custom_logo' ) && get_theme_mod( 'custom_logo' ) );
$show_big_front_title = ( ( is_home() && is_front_page() ) && ! $has_logo && ! get_theme_mod( 'miyazaki_disable_front_page_title' ) );
if ( ! $show_big_front_title ) :
if ( $has_logo ) : ?>
<div class="site-logo">
<?php
// Display the regular logo
miyazaki_custom_logo();
// Display the overlay logo, if it's set
miyazaki_custom_logo( 'miyazaki_overlay_logo' );
?>
</div><!-- .header-logo -->
<?php
elseif ( is_front_page() ) : ?>
<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php bloginfo( 'name' ); ?></a></h1>
<?php else : ?>
<p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php bloginfo( 'name' ); ?></a></p>
<?php endif; ?>
<?php endif; ?>
<ul class="main-menu header-menu reset-list-style">
<?php
if ( has_nav_menu( 'primary-menu' ) ) {
wp_nav_menu( array(
'container' => '',
'items_wrap' => '%3$s',
'theme_location' => 'primary-menu',
) );
} else {
wp_list_pages( array(
'container' => '',
'title_li' => '',
) );
}
?>
</ul><!-- .main-menu -->
</div><!-- .header-left -->
<div class="header-right">
<button class="toggle nav-toggle" data-toggle-target=".mobile-menu-wrapper" data-toggle-scroll-lock="true">
<label>
<span class="show"><?php _e( 'Menu', 'miyazaki' ); ?></span>
<span class="hide"><?php _e( 'Close', 'miyazaki' ); ?></span>
</label>
<div class="bars">
<div class="bar"></div>
<div class="bar"></div>
<div class="bar"></div>
</div><!-- .bars -->
</button><!-- .nav-toggle -->
<?php
$disable_search = get_theme_mod( 'miyazaki_disable_search' );
if ( ! $disable_search ) : ?>
<button class="toggle search-toggle" data-toggle-target=".search-overlay" data-toggle-scroll-lock="true" data-set-focus=".search-overlay .search-field">
<?php _e( 'Search', 'miyazaki' ); ?>
</button><!-- .search-toggle -->
<?php endif; ?>
</div><!-- .header-right -->
</div><!-- .section-inner -->
</header><!-- #site-header -->
<div class="mobile-menu-wrapper cover-modal" data-untoggle-above="1020" data-toggle-element=".nav-toggle">
<div class="mobile-menu-container section-inner">
<div class="mobile-menu-top">
<ul class="mobile-menu header-menu reset-list-style">
<?php
if ( has_nav_menu( 'mobile-menu' ) ) {
wp_nav_menu( array(
'container' => '',
'items_wrap' => '%3$s',
'theme_location' => 'mobile-menu',
) );
} else {
wp_list_pages( array(
'container' => '',
'title_li' => '',
) );
}
?>
</ul>
</div><!-- .mobile-menu-top -->
<?php if ( ! $disable_search ) : ?>
<div class="overlay-search-form">
<?php echo get_search_form(); ?>
</div><!-- .overlay-search-form -->
<?php endif; ?>
</div><!-- .mobile-menu -->
</div><!-- .mobile-menu-wrapper -->
<?php if ( ! $disable_search ) : ?>
<div class="search-overlay cover-modal" data-untoggle-below="1020" data-toggle-element=".search-toggle">
<div class="section-inner overlay-search-form search-overlay-form-wrapper">
<?php echo get_search_form(); ?>
</div><!-- .section-inner -->
</div><!-- .search-overlay -->
<?php endif; ?>
<?php if ( $show_big_front_title ) : ?>
<div class="front-title-wrapper section-inner">
<h1 class="front-title site-title"><?php bloginfo( 'name' ); ?></h1>
</div>
<?php endif; ?>