forked from ArrayHQ/paperback
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheader.php
135 lines (116 loc) · 4 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
<?php
/**
* The Header for our theme.
*
* Displays all of the <head> section and everything up till <div id="content">
*
* @package Paperback
*/
?>
<!DOCTYPE html>
<html <?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">
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<header id="masthead" class="site-header" role="banner">
<div class="top-navigation">
<div class="container">
<nav id="secondary-navigation" class="main-navigation secondary-navigation" role="navigation">
<?php if ( has_nav_menu( 'secondary' ) ) {
wp_nav_menu( array(
'theme_location' => 'secondary'
) );
} ?>
</nav><!-- .secondary-navigation -->
<div class="top-navigation-right">
<?php if ( has_nav_menu( 'social' ) ) { ?>
<nav class="social-navigation" role="navigation">
<?php wp_nav_menu( array(
'theme_location' => 'social',
'depth' => 1,
'fallback_cb' => false
) );?>
</nav><!-- .social-navigation -->
<?php } ?>
<div class="overlay-toggle drawer-toggle drawer-open-toggle">
<span class="toggle-visible">
<i class="fa fa-search"></i>
<?php esc_html_e( 'Explore', 'paperback' ); ?>
</span>
<span>
<i class="fa fa-times"></i>
<?php esc_html_e( 'Close', 'paperback' ); ?>
</span>
</div><!-- .overlay-toggle-->
<div class="overlay-toggle drawer-toggle drawer-menu-toggle">
<span class="toggle-visible">
<i class="fa fa-bars"></i>
<?php esc_html_e( 'Menu', 'paperback' ); ?>
</span>
<span>
<i class="fa fa-times"></i>
<?php esc_html_e( 'Close', 'paperback' ); ?>
</span>
</div><!-- .overlay-toggle-->
</div><!-- .top-navigation-right -->
</div><!-- .container -->
</div><!-- .top-navigation -->
<div class="drawer-wrap">
<?php
// Get the explore drawer (template-parts/content-drawer.php)
get_template_part( 'template-parts/content-drawer' );
// Get the explore drawer (template-parts/content-menu-drawer.php)
get_template_part( 'template-parts/content-menu-drawer' );
?>
</div><!-- .drawer-wrap -->
<div class="site-identity clear">
<div class="container">
<!-- Site title and logo -->
<?php
paperback_title_logo();
$mega_menu = get_theme_mod( 'paperback_category_menu', 'disabled' );
?>
<!-- Main navigation -->
<nav id="site-navigation" class="main-navigation <?php echo esc_attr( $mega_menu ); ?>" role="navigation">
<?php wp_nav_menu( array(
'theme_location' => 'primary'
) );?>
</nav><!-- .main-navigation -->
</div><!-- .container -->
</div><!-- .site-identity-->
<?php
if ( 'enabled' == $mega_menu ) { ?>
<div class="featured-posts-wrap clear">
<div class="featured-posts clear">
<div class="featured-header">
<span class="featured-header-category"></span>
<span class="featured-header-close"><i class="fa fa-times"></i> <?php esc_html_e( 'Close', 'paperback' ); ?></span>
</div>
<div class="post-container clear"></div>
</div>
</div>
<?php } // If mega menu enabled ?>
</header><!-- .site-header -->
<?php
// Get the fixed nav bar for EDD
if ( function_exists( 'EDD' ) && get_option( 'paperback_hero_header_edd' ) ) {
get_template_part( 'inc/edd/content-fixed-bar-edd' );
} else {
// Get the standard fixed bar
get_template_part( 'template-parts/content-fixed-bar' );
}
// Get the hero header for EDD
if ( function_exists( 'EDD' ) && get_option( 'paperback_featured_option', 'post' ) == 'download' ) {
get_template_part( 'inc/edd/content-hero-header-edd' );
} else {
// Get the standard hero header
get_template_part( 'template-parts/content-hero-header' );
}
?>
<div id="page" class="hfeed site container">
<div id="content" class="site-content">