-
Notifications
You must be signed in to change notification settings - Fork 1
/
header.php
182 lines (164 loc) · 8.14 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
172
173
174
175
176
177
178
179
180
181
182
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<?php
global $themeum_options;
?>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<?php
if(isset($themeum_options['favicon'])){ ?>
<link rel="shortcut icon" href="<?php echo esc_url($themeum_options['favicon']['url']); ?>" type="image/x-icon"/>
<?php }else{ ?>
<link rel="shortcut icon" href="<?php echo esc_url(get_template_directory_uri().'/images/plus.png'); ?>" type="image/x-icon"/>
<?php } ?>
<link rel="profile" href="http://gmpg.org/xfn/11">
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
<?php wp_head(); ?>
</head>
<?php
if ( isset($themeum_options['boxfull-en']) ) {
$layout = esc_attr($themeum_options['boxfull-en']);
}else{
$layout = 'fullwidth';
}
?>
<body <?php body_class( $layout.'-bg' ); ?>>
<?php if( isset($themeum_options['preloader_en']) && $themeum_options['preloader_en']==1 ) { ?>
<div id="qLoverlay"></div>
<?php } ?>
<div id="page" class="hfeed site <?php echo esc_attr($layout); ?>">
<?php $headertype = get_post_meta(get_the_ID(),'thm_header_type',true);
$header_type = 'solid';
if($headertype == 2) {
$header_type = 'transparent';
} else {
$header_type = 'solid';
}
?>
<header id="masthead" class="site-header header <?php echo $header_type;?>">
<div id="header-container">
<div id="navigation" class="container">
<div class="row">
<div class="col-sm-3">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<div class="logo-wrapper">
<a class="navbar-brand" href="<?php echo site_url(); ?>">
<?php
if (isset($themeum_options['logo']))
{
if($themeum_options['logo-text-en']) { ?>
<h1> <?php echo esc_html($themeum_options['logo-text']); ?> </h1>
<?php }
else
{
if(!empty($themeum_options['logo'])) {
?>
<img class="enter-logo img-responsive" src="<?php echo esc_url($themeum_options['logo']['url']); ?>" alt="" title="">
<?php
}else{
echo esc_html(get_bloginfo('name'));
}
}
}
else
{
echo esc_html(get_bloginfo('name'));
}
?>
</a>
</div>
</div>
</div>
<div class="col-sm-9 woo-menu-item-add">
<?php
global $woocommerce;
if($woocommerce) {
if( isset($themeum_options['cart_open']) && $themeum_options['cart_open']==1 ) { ?>
<span id="themeum-woo-cart" class="woo-cart" style="display:none;">
<?php
$has_products = '';
//if($woocommerce->cart->cart_contents_count) {
$has_products = 'cart-has-products';
//}
?>
<span class="woo-cart-items">
<span class="<?php echo $has_products; ?>"><?php echo $woocommerce->cart->cart_contents_count; ?></span>
</span>
<i class="fa fa-shopping-cart"></i>
<?php the_widget( 'WC_Widget_Cart', 'title= ' ); ?>
</span>
<?php }} ?>
<div id="main-menu" class="hidden-xs">
<?php
if ( has_nav_menu( 'primary' ) ) {
wp_nav_menu( array(
'theme_location' => 'primary',
'container' => '',
'menu_class' => 'nav',
'fallback_cb' => 'wp_page_menu',
'depth' => 3,
'walker' => new Megamenu_Walker()
)
);
}
?>
</div><!--/#main-menu-->
</div>
<div id="mobile-menu" class="visible-xs">
<div class="collapse navbar-collapse">
<?php
if ( has_nav_menu( 'primary' ) ) {
wp_nav_menu( array(
'theme_location' => 'primary',
'container' => false,
'menu_class' => 'nav navbar-nav',
'fallback_cb' => 'wp_page_menu',
'depth' => 3,
'walker' => new wp_bootstrap_mobile_navwalker()
)
);
}
?>
</div>
</div><!--/.#mobile-menu-->
</div><!--/.row-->
</div><!--/.container-->
</div>
</header><!--/#header-->
<?php
if ( has_nav_menu( 'secondary_nav' ) )
{ ?>
<div id="secondary-menu">
<div class="secondary-menu-wrap">
<div class="container">
<div class="row">
<div class="col-md-9">
<div class="secondary-menu">
<div class="navbar">
<?php $default = array( 'theme_location' => 'secondary_nav',
'container' => '',
'menu_class' => 'nav navbar-nav',
'menu_id' => 'menu-secondary-menu',
'fallback_cb' => 'wp_page_menu',
'depth' => 1,
'walker' => new wp_bootstrap_mobile_navwalker()
);
wp_nav_menu($default);
?>
</div><!--/.navbar-->
</div><!--/.secondary-menu-->
</div><!--/.col-md-9-->
<div class="col-md-3 home-search hidden-xs hidden-sm">
<?php echo get_search_form();?>
</div><!--/.container-->
</div><!--/.row-->
</div><!--/.container-->
</div> <!--/secondary-menu-wrap-->
</div> <!--/#secondary-menu-->
<?php }?>