-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheader.php
120 lines (115 loc) · 5.63 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
<?php
/**
* The template for displaying the header
*
* Displays all of the head element and everything up until the "container" div.
*
* @category TacticalWP-Theme
* @package TacticalWP
* @author Tyler Kemme <[email protected]>
* @license MIT https://opensource.org/licenses/MIT
* @version 1.0.4
* @link https://github.com/tpkemme/tacticalwp-theme
* @since 1.0.0
*/
?>
<!doctype html>
<html class="no-js" <?php language_attributes(); ?> >
<head>
<meta charset="<?php bloginfo('charset'); ?>" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<?php wp_head(); ?>
<?php /* embedded styles set with theme settings */ get_template_part('template-parts/embedded-styles'); ?>
</head>
<body <?php body_class(); ?>>
<?php do_action('twp_after_body'); ?>
<?php if (get_theme_mod('wpt_mobile_menu_layout') === 'offcanvas' ) : ?>
<div class="off-canvas-wrapper">
<div class="off-canvas-wrapper-inner" data-off-canvas-wrapper>
<?php get_template_part('template-parts/mobile-off-canvas'); ?>
<?php endif; ?>
<?php do_action('twp_layout_start'); ?>
<header id="masthead" class="site-header" role="banner">
<nav id="site-navigation" class="main-navigation top-bar" role="navigation">
<?php if (twp_get_option('twp_nav_top_menu_alignment') === 'right' ) : ?>
<?php if (twp_get_option('twp_nav_top_search') === 'show' ) : ?>
<div class="top-bar-right top-bar-search">
<ul class="menu">
<li><input type="search" placeholder="Search"></li>
<li><button type="button" class="button"><i class="fa fa-search" aria-hidden="true"></i></button></li>
</ul>
</div>
<?php get_template_part('template-parts/mobile-top-bar'); ?>
<?php endif; ?>
<?php if ( ! get_theme_mod('wpt_mobile_menu_layout') || get_theme_mod('wpt_mobile_menu_layout') === 'topbar' ) : ?>
<div class="title-bar-title show-for-medium">
<ul class="title-bar-title dropdown menu" data-dropdown-menu>
<li class="menu-text">
<a href="<?php echo esc_url(home_url('/')); ?>" rel="home">
<?php $logo = twp_get_option('twp_nav_top_logo_image'); ?>
<?php if ( ! empty($logo) ) : ?>
<img src="<?php echo $logo; ?>" class="site-logo" />
<?php endif; ?>
<?php if (twp_get_option('twp_nav_top_title_show') === 'show' ) : ?>
<?php bloginfo('name'); ?>
<?php endif; ?>
</a>
</li>
</ul>
</div>
<div class="title-bar-title show-for-small-only">
<ul class="title-bar-title dropdown menu" data-dropdown-menu>
<li class="menu-text">
<a href="<?php echo esc_url(home_url('/')); ?>" rel="home">
<?php $logo = twp_get_option('twp_nav_top_logo_image'); ?>
<?php if ( ! empty($logo) ) : ?>
<img src="<?php echo $logo; ?>" class="site-logo" />
<?php endif; ?>
<?php if (twp_get_option('twp_nav_top_title_show') === 'show' ) : ?>
<?php bloginfo('name'); ?>
<?php endif; ?>
</a>
</li>
</ul>
</div>
<?php get_template_part('template-parts/mobile-top-bar'); ?>
<div class="top-bar-right">
<?php twp_top_bar_r(); ?>
</div>
<?php endif; ?>
<?php else : ?>
<div class="top-bar-left">
<div class="title-bar-title show-for-medium">
<ul class="title-bar-title dropdown menu" data-dropdown-menu>
<li class="menu-text">
<a href="<?php echo esc_url(home_url('/')); ?>" rel="home">
<?php $logo = twp_get_option('twp_nav_top_logo_image'); ?>
<?php if ( ! empty($logo) ) : ?>
<img src="<?php echo $logo; ?>" class="site-logo" />
<?php endif; ?>
<?php if (twp_get_option('twp_nav_top_title_show') === 'show' ) : ?>
<?php bloginfo('name'); ?>
<?php endif; ?>
</a>
</li>
</ul>
</div>
</div>
<?php twp_top_bar_r(); ?>
<?php if (twp_get_option('twp_nav_top_search') === 'show' ) : ?>
<div class="top-bar-right top-bar-search">
<ul class="menu">
<li><input type="search" placeholder="<?php twp('nav_top_search_placeholder_text'); ?>"></li>
<li><button type="button" class="button"><i class="fa fa-search" aria-hidden="true"></i></button></li>
</ul>
<?php if ( ! get_theme_mod('wpt_mobile_menu_layout') || get_theme_mod('wpt_mobile_menu_layout') === 'topbar' ) : ?>
<?php get_template_part('template-parts/mobile-top-bar'); ?>
<?php endif; ?>
</div>
<?php endif; ?>
<?php endif; ?>
</nav>
</header>
<section class="container">
<?php
do_action('twp_after_header');