This repository has been archived by the owner on Jul 7, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
header.php
142 lines (118 loc) · 3.81 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
<?php
/**
* The Header for our theme.
*
* Displays all of the <head> section and everything up till <div id="content">
*
* @package Latest
*/
?>
<!DOCTYPE html>
<html <?php language_attributes(); ?> class="no-js">
<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">
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<?php $detect = new Mobile_Detect; ?>
<?php do_action( 'latest_before_header' ); ?>
<header id="masthead" class="site-header">
<?php do_action( 'latest_top_header' ); ?>
<?php
// Load the top nav on desktop
$headline_text = get_theme_mod( 'latest_headline_text' );
if ( has_nav_menu( 'top-nav' ) || has_nav_menu( 'social' ) || $headline_text ) {
?>
<div class="top-bar clear">
<div class="container">
<?php if ( $headline_text ) { ?>
<div class="headline-text"><?php echo wp_kses_post( $headline_text ); ?></div>
<?php } else { // Show today's date as a fallback ?>
<div class="headline-text"><?php echo date( get_option( 'date_format' ) ); ?></div>
<?php } ?>
<?php if ( has_nav_menu( 'social' ) ) { ?>
<nav class="social-navigation">
<?php wp_nav_menu( array(
'theme_location' => 'social',
'depth' => 1,
'fallback_cb' => false
) );?>
</nav><!-- .social-navigation -->
<?php } ?>
<?php if ( has_nav_menu( 'top-nav' ) ) { ?>
<nav class="top-navigation">
<?php wp_nav_menu( array(
'theme_location' => 'top-nav',
'depth' => 1,
'fallback_cb' => false
) );?>
</nav><!-- .social-navigation -->
<?php } ?>
</div><!-- .container -->
</div><!-- .top-bar -->
<?php } ?>
<div class="mobile-bar">
<div class="container">
<div class="overlay-toggle drawer-toggle drawer-menu-toggle">
<span class="toggle-visible">
<i class="fa fa-bars"></i>
<?php esc_html_e( 'Menu', 'latest' ); ?>
</span>
<span>
<i class="fa fa-times"></i>
<?php esc_html_e( 'Close', 'latest' ); ?>
</span>
</div><!-- .overlay-toggle-->
</div><!-- .container -->
<div class="mobile-drawer">
<?php
// Get the explore drawer (template-parts/content-menu-drawer.php)
get_template_part( 'template-parts/content-menu-drawer' );
?>
</div><!-- .drawer-wrap -->
</div><!-- .mobile-bar -->
<?php if ( has_nav_menu( 'primary' ) ) {
$menu_status = 'has_primary_menu';
} else {
$menu_status = 'no_primary_menu';
} ?>
<div class="site-identity clear <?php echo $menu_status ?>">
<div class="container">
<div class="header-search-container">
<?php do_action( 'latest_header_search_area' ); ?>
</div><!-- .big-search-container -->
<!-- Site title and logo -->
<?php latest_title_logo(); ?>
</div><!-- .container -->
<!-- Main navigation -->
<nav id="site-navigation" class="main-navigation">
<div class="container">
<?php do_action( 'latest_before_primary_menu' ); ?>
<?php wp_nav_menu( array(
'theme_location' => 'primary'
) );?>
<?php do_action( 'latest_after_primary_menu' ); ?>
</div><!-- .container -->
</nav><!-- .main-navigation -->
</div><!-- .site-identity-->
<?php do_action( 'latest_bottom_header' ); ?>
</header><!-- .site-header -->
<?php do_action( 'latest_after_header' ); ?>
<?php
// Get the standard hero header
get_template_part( 'template-parts/content-hero-header' );
?>
<?php
// Get the featured pages
get_template_part( 'template-parts/content-featured-pages' );
?>
<?php
// Get the standard fixed bar
get_template_part( 'template-parts/content-fixed-bar' );
?>
<?php do_action( 'latest_before_page' ); ?>
<div id="page" class="hfeed site">
<div id="content" class="site-content">