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
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
|
<?php global $woo_options; global $woocommerce; global $flatsome_opt; ?> <!DOCTYPE html> <!--[if lte IE 9 ]><html class="ie lt-ie9" <?php language_attributes(); ?>> <![endif]--> <!--[if (gte IE 9)|!(IE)]><!--><html <?php language_attributes(); ?>> <!--<![endif]--> <head> <meta charset="<?php bloginfo( 'charset' ); ?>" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> <title><?php wp_title( '|', true, 'right' ); ?></title>
<link rel="profile" href="http://gmpg.org/xfn/11" /> <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
<!-- Custom favicon--> <link rel="shortcut icon" href="<?php if ($flatsome_opt['site_favicon']) { echo $flatsome_opt['site_favicon']; ?> <?php } else { ?><?php echo get_template_directory_uri(); ?>/favicon.png<?php } ?>" />
<!-- Retina/iOS favicon --> <link rel="apple-touch-icon-precomposed" href="<?php if ($flatsome_opt['site_favicon_large']) { echo $flatsome_opt['site_favicon_large']; ?> <?php } else { ?><?php echo get_template_directory_uri(); ?>/apple-touch-icon-precomposed.png<?php } ?>" />
<?php wp_head(); ?> </head>
<body <?php body_class(); ?>>
<?php // HTML Homepage Before Header // Set in Theme Option > HTML Blocks if($flatsome_opt['html_intro'] && is_front_page()) echo '<div class="home-intro">'.do_shortcode($flatsome_opt['html_intro']).'</div>' ?>
<div id="wrapper"<?php if($flatsome_opt['box_shadow']) echo ' class="box-shadow"';?>> <div class="header-wrapper before-sticky"> <?php do_action( 'before' ); ?> <?php if(!isset($flatsome_opt['topbar_show']) || $flatsome_opt['topbar_show']){ ?> <div id="top-bar"> <div class="row"> <div class="large-12 columns"> <!-- left text --> <div class="left-text left"> <div class="html"><?php echo do_shortcode( $flatsome_opt['topbar_left']);?></div><!-- .html --> </div> <!-- right text --> <div class="right-text right"> <?php if ( has_nav_menu( 'top_bar_nav' ) ) : ?> <?php wp_nav_menu(array( 'theme_location' => 'top_bar_nav', 'menu_class' => 'top-bar-nav', 'before' => '', 'after' => '', 'link_before' => '', 'link_after' => '', 'depth' => 2, 'fallback_cb' => false, 'walker' => new FlatsomeNavDropdown )); ?> <?php else: ?> Define your top bar navigation in <b>Apperance > Menus</b> <?php endif; ?> </div><!-- .pos-text -->
</div><!-- .large-12 columns --> </div><!-- .row --> </div><!-- .#top-bar --> <?php }?>
<header id="masthead" class="site-header" role="banner"> <div class="row"> <div class="large-12 columns header-container"> <div class="mobile-menu show-for-small"><a href="#open-menu"><span class="icon-menu"></span></a></div><!-- end mobile menu --> <?php if($flatsome_opt['logo_position'] == 'left') : ?> <div id="logo" class="logo-left"> <a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?> - <?php bloginfo( 'description' ); ?>" rel="home"> <?php if($flatsome_opt['site_logo']){ $site_title = esc_attr( get_bloginfo( 'name', 'display' ) ); echo '<img src="'.$flatsome_opt['site_logo'].'" class="header_logo" alt="'.$site_title.'"/>'; if ( is_page_template( 'page-transparent-header-light.php' )) { if($flatsome_opt['site_logo_dark']){ echo '<img src="'.$flatsome_opt['site_logo_dark'].'" class="header_logo_dark" alt="'.$site_title.'"/>'; } } } else {bloginfo( 'name' );}?> </a> </div><!-- .logo --> <?php endif; ?>
<div class="left-links"> <?php if(!isset($flatsome_opt['nav_position']) || $flatsome_opt['nav_position'] == 'top'){ ?> <ul id="site-navigation" class="header-nav"> <?php if ( has_nav_menu( 'primary' ) ) : ?> <?php if (!isset($flatsome_opt['search_pos']) || $flatsome_opt['search_pos'] == 'left') { ?> <li class="search-dropdown"> <a href="#" class="nav-top-link icon-search" onClick="return false;"></a> <div class="nav-dropdown"> <?php if(function_exists('get_product_search_form')) { get_product_search_form(); } else { get_search_form(); } ?> </div><!-- .nav-dropdown --> </li><!-- .search-dropdown --> <?php } ?>
<?php wp_nav_menu(array( 'theme_location' => 'primary', 'container' => false, 'items_wrap' => '%3$s', 'depth' => 0, 'walker' => new FlatsomeNavDropdown )); ?>
<?php if (isset($flatsome_opt['search_pos']) && $flatsome_opt['search_pos'] == 'right') { ?> <li class="search-dropdown"> <a href="#" class="nav-top-link icon-search"></a> <div class="nav-dropdown"> <?php if(function_exists('get_product_search_form')) { get_product_search_form(); } else { get_search_form(); } ?> </div><!-- .nav-dropdown --> </li><!-- .search-dropdown --> <?php } ?>
<?php else: ?> <li>Define your main navigation in <b>Apperance > Menus</b></li> <?php endif; ?> </ul> <?php } else if($flatsome_opt['nav_position'] == 'bottom' || $flatsome_opt['nav_position'] == 'bottom_center') { ?> <div class="wide-nav-search hide-for-small"> <?php if($flatsome_opt['search_pos'] == 'left'){ ?> <div> <?php if(function_exists('get_product_search_form')) { get_product_search_form(); } else { get_search_form(); } ?> </div> <?php } ?> <div> <?php echo do_shortcode($flatsome_opt['nav_position_text_top']); ?> </div> </div>
<?php } ?> </div><!-- .left-links -->
<?php if($flatsome_opt['logo_position'] == 'center') { ?> <div id="logo"> <a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?> - <?php bloginfo( 'description' ); ?>" rel="home"> <?php if($flatsome_opt['site_logo']){ $site_title = esc_attr( get_bloginfo( 'name', 'display' ) ); echo '<img src="'.$flatsome_opt['site_logo'].'" class="header_logo" alt="'.$site_title.'"/>'; if ( is_page_template( 'page-transparent-header-light.php' )) { if($flatsome_opt['site_logo_dark']){ echo '<img src="'.$flatsome_opt['site_logo_dark'].'" class="header_logo_dark" alt="'.$site_title.'"/>'; } } } else {bloginfo( 'name' );}?> </a> </div><!-- .logo --> <?php } ?>
<div class="right-links"> <?php if(!$flatsome_opt['catalog_mode']) { ?> <ul <?php if($flatsome_opt['nav_position'] == 'top_right'){ ?>id="site-navigation"<?php } ?> class="header-nav"> <?php if($flatsome_opt['nav_position'] == 'top_right'){ ?> <?php if ( has_nav_menu( 'primary' ) ) { ?> <?php if (!isset($flatsome_opt['search_pos']) || $flatsome_opt['search_pos'] == 'left') { ?> <li class="search-dropdown"> <a href="#" class="nav-top-link icon-search" onClick="return false;"></a> <div class="nav-dropdown"> <?php if(function_exists('get_product_search_form')) { get_product_search_form(); } else { get_search_form(); } ?> </div><!-- .nav-dropdown --> </li><!-- .search-dropdown --> <?php } ?>
<?php wp_nav_menu(array( 'theme_location' => 'primary', 'container' => false, 'items_wrap' => '%3$s', 'depth' => 0, 'walker' => new FlatsomeNavDropdown )); ?>
<?php if (isset($flatsome_opt['search_pos']) && $flatsome_opt['search_pos'] == 'right') { ?> <li class="search-dropdown"> <a href="#" class="nav-top-link icon-search"></a> <div class="nav-dropdown"> <?php if(function_exists('get_product_search_form')) { get_product_search_form(); } else { get_search_form(); } ?> </div><!-- .nav-dropdown --> </li><!-- .search-dropdown --> <?php } ?> <?php } ?> <?php } // primary-nav right style ?>
<?php if($flatsome_opt['top_right_text']) { ?> <li class="html-block"> <div class="html-block-inner hide-for-small"><?php echo do_shortcode($flatsome_opt['top_right_text']); ?></div> </li> <?php } ?> <?php if(!isset($flatsome_opt['myaccount_dropdown']) || $flatsome_opt['myaccount_dropdown']) { ?> <li class="account-dropdown hide-for-small"> <?php if ( is_user_logged_in() ) { ?> <a href="<?php echo get_permalink( get_option('woocommerce_myaccount_page_id') ); ?>" class="nav-top-link nav-top-login"> <?php _e('My Account', 'woocommerce'); ?> </a> <div class="nav-dropdown"> <ul> <?php if ( has_nav_menu( 'my_account' ) ) : ?> <?php wp_nav_menu(array( 'theme_location' => 'my_account', 'container' => false, 'items_wrap' => '%3$s', 'depth' => 0, )); ?> <?php else: ?> <li>Define your My Account dropdown menu in <b>Apperance > Menus</b></li> <?php endif; ?> </ul> </div><!-- end account dropdown --> <?php } else { ?> <a href="<?php echo get_permalink( get_option('woocommerce_myaccount_page_id') ); ?>" class="nav-top-link nav-top-not-logged-in"><?php _e('Login', 'woocommerce'); ?></a> <?php } ?> </li> <?php } ?>
<!-- Show mini cart if Woocommerce is activated --> <?php if(!isset($flatsome_opt['show_cart']) || $flatsome_opt['show_cart'] == 1) { ?> <?php if(function_exists('wc_print_notices')) { ?> <li class="mini-cart"> <div class="cart-inner"> <?php // Edit this content in inc/template-tags.php. Its gets relpaced with Ajax! ?> <a href="<?php echo esc_url( $woocommerce->cart->get_cart_url() ); ?>" class="cart-link"> <strong class="cart-name hide-for-small"><?php _e('Cart', 'woocommerce'); ?></strong> <span class="cart-price hide-for-small">/ <?php echo $woocommerce->cart->get_cart_total(); ?></span> <!-- cart icon --> <div class="cart-icon"> <?php if ($flatsome_opt['custom_cart_icon']){ ?> <div class="custom-cart-inner"> <div class="custom-cart-count"><?php echo $woocommerce->cart->cart_contents_count; ?></div> <img class="custom-cart-icon" src="<?php echo $flatsome_opt['custom_cart_icon']?>"/> </div><!-- .custom-cart-inner --> <?php } else { ?> <strong><?php echo $woocommerce->cart->cart_contents_count; ?></strong> <span class="cart-icon-handle"></span> <?php }?> </div><!-- end cart icon --> </a> <div class="nav-dropdown"> <div class="nav-dropdown-inner"> <!-- Add a spinner before cart ajax content is loaded --> <?php if ($woocommerce->cart->cart_contents_count == 0) { echo '<p class="empty">'.__('No products in the cart.','woocommerce').'</p>'; ?> <?php } else { //add a spinner ?> <div class="loading"><i></i><i></i><i></i><i></i></div> <?php } ?> </div><!-- nav-dropdown-innner --> </div><!-- .nav-dropdown --> </div><!-- .cart-inner --> </li><!-- .mini-cart --> <?php } ?> <?php } ?> </ul><!-- .header-nav --> <?php } else { ?> <div class="catalog-mode-header"> <?php echo do_shortcode($flatsome_opt['catalog_mode_header']); ?> </div> <?php } ?>
</div><!-- .right-links --> </div><!-- .large-12 --> </div><!-- .row -->
</header><!-- .header -->
<?php if($flatsome_opt['nav_position'] == 'bottom' || $flatsome_opt['nav_position'] == 'bottom_center') { ?> <!-- Main navigation - Full width style --> <div class="wide-nav <?php echo $flatsome_opt['nav_position_color']; ?> <?php if($flatsome_opt['nav_position'] == 'bottom_center') {echo 'nav-center';} else {echo 'nav-left';} ?>"> <div class="row"> <div class="large-12 columns"> <div class="nav-wrapper"> <ul id="site-navigation" class="header-nav"> <?php if ( has_nav_menu( 'primary' ) ) : ?> <?php wp_nav_menu(array( 'theme_location' => 'primary', 'container' => false, 'items_wrap' => '%3$s', 'depth' => 3, 'walker' => new FlatsomeNavDropdown )); ?>
<?php if($flatsome_opt['search_pos'] == 'right' && $flatsome_opt['nav_position'] == 'bottom_center'){ ?> <li class="search-dropdown"> <a href="#" class="nav-top-link icon-search" onClick="return false;"></a> <div class="nav-dropdown"> <?php if(function_exists('get_product_search_form')) { get_product_search_form(); } else { get_search_form(); } ?> </div><!-- .nav-dropdown --> </li><!-- .search-dropdown --> <?php } ?> <?php else: ?> <li>Define your main navigation in <b>Apperance > Menus</b></li> <?php endif; ?> </ul> <?php if($flatsome_opt['nav_position'] == 'bottom') { ?> <div class="right hide-for-small"> <div class="wide-nav-right"> <div> <?php echo do_shortcode($flatsome_opt['nav_position_text']); ?> </div> <?php if($flatsome_opt['search_pos'] == 'right'){ ?> <div> <?php if(function_exists('get_product_search_form')) { get_product_search_form(); } else { get_search_form(); } ?> </div> <?php } ?> </div> </div> <?php } ?> </div><!-- .nav-wrapper --> </div><!-- .large-12 --> </div><!-- .row --> </div><!-- .wide-nav --> <?php } ?> </div><!-- .header-wrapper -->
<div id="main-content" class="site-main <?php echo $flatsome_opt['content_color']; ?>"> <?php //adds a border line if header is white if (strpos($flatsome_opt['header_bg'],'#fff') !== false && $flatsome_opt['nav_position'] == 'top') { echo '<div class="row"><div class="large-12 columns"><div class="top-divider"></div></div></div>'; } ?>
<?php if($flatsome_opt['html_after_header']){ // AFTER HEADER HTML BLOCK echo '<div class="block-html-after-header" style="position:relative;top:-1px;">'; echo do_shortcode($flatsome_opt['html_after_header']); echo '</div>'; } ?>
<!-- woocommerce message --> <?php if(function_exists('wc_print_notices')) {wc_print_notices();}?>
|