-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathheader.php
More file actions
203 lines (128 loc) · 4.38 KB
/
header.php
File metadata and controls
203 lines (128 loc) · 4.38 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
<?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 codexin
*/
?><!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta http-equiv="X-UA-Compatible" content="IE=9">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title><?php bloginfo('name'); ?></title>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<!--[if IE 9]>
<link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/css/ie9.css">
<![endif]-->
<?php global $codexin ?>
<?php
if(!empty($codexin['codexin-google-map-latitude'])):
$latitude = $codexin['codexin-google-map-latitude'];
endif;
if(!empty($codexin['codexin-google-map-longitude'])):
$longtitude = $codexin['codexin-google-map-longitude'];
endif;
if(!empty($codexin['codexin-google-map-zoom'])):
$c_zoom = $codexin['codexin-google-map-zoom'];
endif;
if(!empty($codexin['codexin-google-map-marker'])):
$gmap_marker = $codexin['codexin-google-map-marker'];
endif;
?>
<script type="text/javascript">
var codexin_lat = "<?= $latitude ?>";
var codexin_long = "<?= $longtitude ?>";
var codexin_marker = "<?= $gmap_marker['url'] ?>";
var codexin_m_zoom = Number ("<?= $c_zoom ?>");
</script>
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<!-- Site Loader -->
<div id="loader">
<div class="cssload-container">
<div class="cssload-speeding-wheel"></div>
</div>
</div>
<!-- Site Loader finished -->
<div id="c-menu--slide-left" class="c-menu c-menu--slide-left">
<button class="c-menu__close">← Back</button><?php get_mobile_menu() ?>
</div>
<div id="c-mask" class="c-mask"></div>
<div id="whole" class="whole-site-wrapper">
<header id="header" class="header">
<?php
$header_version = $codexin ['codexin-header-version'];
?>
<?php
if($header_version == 1):
get_template_part('template-parts/header/header', 'one');
elseif($header_version == 2):
get_template_part('template-parts/header/header', 'two');
elseif($header_version == 3):
get_template_part('template-parts/header/header', 'three');
elseif($header_version == 4):
get_template_part('template-parts/header/header', 'four');
endif; ?>
<?php if(is_front_page()): ?>
<?php if ( shortcode_exists( '[rev_slider alias="kenburnsslider"]' ) ): ?>
<div class="cx-slider-wrapper">
<?php echo do_shortcode('[rev_slider alias="kenburnsslider"]'); ?>
</div>
<?php endif; ?>
<?php else: ?>
<?php $header_bg = rwmb_meta('codexin_page_background', 'type=image_advanced'); ?>
<?php
foreach ($header_bg as $single_bg) {
$single_bg = $single_bg['full_url'];
}
?>
<section id="page_title" class="page-title" <?php if (!empty($single_bg)): ?> style="background-image: url('<?php echo $single_bg; ?>')" <?php endif; ?>>
<div class="container">
<div class="row">
<div class="col-xs-12">
<div class="page-title-wrapper">
<h1><?php if(is_home()):
echo "Blog";
elseif(is_404()):
echo "Nothing Found!";
elseif(is_archive()):
the_archive_title();
elseif(is_search()):
printf( esc_html__( 'Search Results for: %s', 'codexin' ), '<span>' . get_search_query() . '</span>' );
else:
single_post_title();
endif;
?></h1>
<div class="breadcrumbs-wrapper">
<p>
<?php $codexin_bc = $codexin['codexin-bcrumbs']; ?>
<?php if( $codexin_bc == 1 ): ?>
<?php
if (function_exists('codexin_custom_breadcrumbs')) {
// passing options as array
$args = array(
'beginningText' => 'Currently Watching: ',
'delimiter' => ' > ',
);
codexin_custom_breadcrumbs($args);
}
?>
<?php endif; ?>
</p>
</div>
</div>
</div>
</div>
</div>
</section>
<?php endif; ?>
</header>