-
Notifications
You must be signed in to change notification settings - Fork 0
/
header.php
153 lines (132 loc) · 5.59 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
<?php
/**
* The header for our theme
*
* @package web-log
* @version 1.0.0
*/
// For top header
$header_status = web_log_get_option( 'show_top_header' );
?>
<!DOCTYPE html>
<html <?php language_attributes(); ?> class="no-js no-svg">
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="profile" href="http://gmpg.org/xfn/11">
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<?php
if ( function_exists( 'wp_body_open' ) ) {
wp_body_open();
}
?>
<div id="page" class="site">
<a class="skip-link screen-reader-text"
href="#content"><?php esc_html_e('Skip to content', 'web-log'); ?></a>
<div class="mobile-menu-wrap">
<div class="mobile-menu"></div>
</div>
<header id="masthead" class="site-header" role="banner">
<div class="header-wrapper">
<div class="mobile-header">
<div class="container">
<div class="row">
<div class="col-lg-12">
<div class="menu-bar-wrap text-center">
<div class="mobile-nav">
<span class="menu-icon"><i class="fa fa-bars" aria-hidden="true"></i></span>
</div>
<div class="mobile-logo">
<?php get_template_part( 'template-parts/header/site', 'branding' ); ?>
</div>
<div class="mobile-search">
<div class="search-icon">
<a href="#" id="mobile-search"><i class="fa fa-search" aria-hidden="true"></i></a>
</div>
<div id="mobile-search-popup" class="search-off full-search-wrapper">
<div id="search" class="open">
<button data-widget="remove" id="close-icon" class="close" type="button"><i class="fa fa-times" aria-hidden="true"></i></button>
<?php echo get_search_form(); ?>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<?php if( $header_status == '1' ): ?>
<div class="header-top">
<div class="container">
<div class="row">
<?php do_action( 'web_log_top_header_menu' );
do_action( 'web_log_top_header_social_icon' );
?>
</div>
</div>
</div>
<?php endif; ?>
<div class="header-logo">
<div class="container">
<div class="row">
<div class="col-lg-12 col-sm-12 desktop-logo">
<?php get_template_part( 'template-parts/header/site', 'branding' ); ?>
</div>
</div>
</div>
</div>
<div class="header-menu">
<div class="container">
<div class="row">
<div class="col-lg-12">
<?php if ( has_nav_menu( 'primary' ) ) : ?>
<div class="navigation-section">
<nav id="site-navigation" class="main-navigation" role="navigation">
<?php wp_nav_menu( array(
'theme_location' => 'primary',
'menu_id' => 'primary-menu',
'menu_class' => 'main-menu',
) );
?>
</nav>
</div><!-- .navigation-section -->
<?php endif; ?>
<div class="mini-search-icon">
<a href="#" id="search-icon"><i class="fa fa-search" aria-hidden="true"></i></a>
</div>
<div id="search-popup" class="search-off full-search-wrapper">
<div id="search" class="open">
<button data-widget="remove" id="removeClass" class="close" type="button"><i class="fa fa-times" aria-hidden="true"></i></button>
<?php echo get_search_form(); ?>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</header><!-- #masthead -->
<?php if( !is_front_page()): ?>
<section class="page-header jumbotron">
<div class="container">
<div class="row">
<div class="col-lg-12">
<?php if(is_page() || is_single() ){ ?>
<h1 class="page-title"><?php echo esc_html( get_the_title() ); ?></h1>
<?php } elseif( is_search() ){ ?>
<h1 class="page-title"><?php printf( esc_html__( 'Search Results for: %s', 'web-log' ), '<span>' . get_search_query() . '</span>' ); ?></h1>
<?php }elseif( is_404() ){ ?>
<h1 class="page-title"><?php echo esc_html( 'Page Not Found: 404', 'web-log'); ?></h1>
<?php }elseif( is_home() ){ ?>
<h1 class="page-title"><?php single_post_title(); ?></h1>
<?php } else{
the_archive_title( '<h1 class="page-title">', '</h1>' );
}
?>
</div>
</div>
</div>
</section>
<?php endif; ?>