-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheader.php
171 lines (114 loc) · 3.58 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
164
165
166
167
168
169
170
171
<?php
/**
* The header for our theme
*
* This is the template that displays all of the <head> section and everything up until <div id="content">
*
* @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
*
* @package cap2019
*/
?>
<!doctype html>
<html <?php language_attributes(); ?> xmlns="http://www.w3.org/1999/xhtml"
xmlns:fb="http://ogp.me/ns/fb#">
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Pragma" content="no-cache">
<link rel="profile" href="https://gmpg.org/xfn/11">
<?php wp_head(); ?>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-24489529-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-24489529-1');
</script>
</head>
<body <?php body_class(); ?>>
<div id="page" class="site">
<a class="skip-link screen-reader-text" href="#content"><?php esc_html_e( 'Skip to content', 'lead' ); ?></a>
<?php
if ( class_exists('acf') ) :
$form_ID = get_field('cap_topsub_form', 'option');
if ( is_numeric( $form_ID ) ) : ?>
<div class="wrap--top-subscribe">
<div class="top-subscribe container">
<?php
echo do_shortcode('[gravityform id=' . (int)$form_ID . ' title=false description=true ajax=true]');
?>
<a href="#" title="<?php _e('Hide this form for 30 days', 'cap'); ?>"><i class="fas fa-times"></i></a>
</div>
</div>
<?php
endif;
endif;
?>
<div id="mobile-navigation" class="mobile-navigation">
<div class="flex-container"><?php cap_nav(); ?></div>
<div>
<?php
if ( class_exists('acf') ) :
cap_nav_follow();
cap_nav_listen();
endif;
?>
</div>
</div><!-- #mobile-navigation -->
<div class="wrap--site-head">
<div class="hamburger hamburger--spin">
<div class="hamburger-box">
<div class="hamburger-inner"></div>
</div>
</div>
<div class="site-head">
<header id="masthead" class="site-header">
<div class="wrap--site-branding">
<div class="site-branding flex-container container">
<div class="flex-item cap-follow wrap--ib">
<?php
if ( class_exists('acf') )
cap_nav_follow();
?>
</div>
<div class="flex-item cap-branding"><?php the_custom_logo(); ?></div>
<div class="flex-item cap-listen wrap--ib">
<?php
if ( class_exists('acf') )
cap_nav_listen();
?>
</div>
</div><!-- .site-branding -->
</div>
<div class="wrap--site-navigation">
<div id="site-navigation" class="main-navigation flex-container container">
<?php cap_nav(); ?>
</div><!-- #site-navigation -->
</div>
</header><!-- #masthead -->
</div>
</div>
<?php
$curr_user_has_paid_mship = current_user_can( 'mepr-active', 'rule: 7000' );
// Display banner if
// 1. banner ad slot is active --- AND
// 2A. user is not logged in OR is logged in but doesn't have the
// paid membership --- OR
// 2B. MEMBERPRESS_TESTING constant is set to true
if ( is_active_sidebar( 'adslot-3' ) &&
(
( !is_user_logged_in() || !$curr_user_has_paid_mship ) ||
( true === MEMBERPRESS_TESTING )
)
) : ?>
<div class="wrap--adslot wrap--adslot-1">
<aside class="adslot adslot-1 container">
<?php dynamic_sidebar( 'adslot-1' ); ?>
</aside>
</div>
<?php
endif;
?>
<div id="content" class="site-content">