-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheader.php
157 lines (151 loc) · 6.91 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
<?php
/**
* The template for displaying the header
*
* Displays all of the head element and everything up until the "site-content" div.
*
* @package Wiser Sites
* @since Wiser Sites 1.0
*/
?>
<?php
global $wiser_option;
?>
<!DOCTYPE html>
<!--[if IE 7]>
<html class="ie ie7" <?php language_attributes(); ?>>
<![endif]-->
<!--[if IE 8]>
<html class="ie ie8" <?php language_attributes(); ?>>
<![endif]-->
<!--[if !(IE 7) & !(IE 8)]><!-->
<html <?php language_attributes(); ?>>
<!--<![endif]-->
<head>
<?php global $theme_url; ?>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width">
<link rel="icon" href="<?php echo $wiser_option['favicon']; ?>" type="image/x-icon" />
<link rel="shortcut icon" href="<?php echo $wiser_option['favicon']; ?>" type="image/x-icon" />
<title><?php wp_title( '|', true, 'right' ); ?></title>
<link rel="profile" href="http://gmpg.org/xfn/11">
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
<!--[if lt IE 9]>
<script src="<?php echo get_template_directory_uri(); ?>/resources/js/html5.js"></script>
<![endif]-->
<link href='http://fonts.googleapis.com/css?family=Lato:400,300italic,300,700,700italic,400italic' rel='stylesheet' type='text/css'>
<?php wp_head(); ?>
<style type="text/css">
body {
background-color: <?php echo $wiser_option['body_bg_color']; ?>; ;
}
#header.home_header {
background: rgba(0, 0, 0, 0)
radial-gradient(ellipse at center center ,
<?php echo $wiser_option['custom_header_bg_gradient']; ?> 0%, /* #30ac5e */
<?php echo $wiser_option['custom_header_bg']; ?> 100%) repeat scroll 0 0; /* #1d8241 */
}
.main_menu, .main_menu a {
background-color: <?php echo $wiser_option['header_menu_bgcolor']; ?>;
color: <?php echo $wiser_option['header_menu_color']; ?>;
}
.nav > li > a:focus, .nav > li > a:hover, .nav li.current-menu-item > a {
background-color: <?php echo $wiser_option['header_active_menu_bgcolor']; ?>;
color: <?php echo $wiser_option['header_active_menu_color']; ?>;
}
.post_inner_content {
color: <?php echo $wiser_option['content_text_color']; ?>;
}
input[type="submit"] {
background-color: <?php echo $wiser_option['submit_buttons_color']; ?> ;
}
.learn_more_btn {
background-color: <?php echo $wiser_option['lear_more_buttons_color']; ?> ;
}
#footer {
background-color: <?php echo $wiser_option['footer_bgcolor']; ?>;
color: <?php echo $wiser_option['footer_txt_color']; ?>;
}
#footer h4,
#footer a {
color: <?php echo $wiser_option['footer_txt_color']; ?>;
}
</style>
</head>
<body <?php body_class(); ?>>
<?php
$is_home = false; $logo = $wiser_option['header_logo']; $fixed_header_logo = $wiser_option['fixed_header_logo'];
if ( is_home() || is_front_page() ) {
$is_home = true;
if( $wiser_option['custom_header'] ){ $logo = $wiser_option['custom_header_logo']; } // custom logo for home page
}
?>
<div id="header" class="header container-fluid <?php if( $is_home && $wiser_option['custom_header'] ){ echo 'home_header'; } ?>">
<div id="header_top_area">
<header id="header_inner" class="container" role="banner">
<div class="row">
<div class="left_header col-md-3">
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php bloginfo( 'name' ); ?>" class="logo" rel="home">
<img src="<?php echo $logo; ?>" alt="logo" class="static_header_logo">
<img src="<?php echo $fixed_header_logo; ?>" alt="fixed header logo" class="fixed_header_logo">
</a>
</div>
<div class="right_header col-md-9 clearfix">
<span class="head_phone phone_icon" title="Phone number">
<a href="tel:<?php echo $wiser_option['phone_number']; ?>"> <?php echo $wiser_option['phone_number']; ?> </a>
</span>
<div id="main_menu_div" class="main_menu_div">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#main_menu" aria-expanded="false" aria-controls="navbar">
<span class="sr-only"><?php _e('Toggle navigation'); ?></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div id="main_menu" class="collapse navbar-collapse">
<?php
wp_nav_menu( array(
'items_wrap' => '<ul id="%1$s" class="%2$s">%3$s</ul>',
'menu_id' => 'main_menu_ul',
'menu_class' => 'main_menu nav navbar-nav',
'container' => 'none',
'theme_location' => 'main_menu'
) ); ?>
</div>
</div>
</div>
</div>
</header>
<!-- #header_inner -->
</div>
<?php
if( $is_home ){
if ( have_posts() ) {
the_post();
?>
<div id="home_header_container" class="<?php if( $is_home && !$wiser_option['custom_header'] ){ echo 'content_header'; } ?>">
<div class="container">
<?php if( has_post_thumbnail() ) {
$prevthumb = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'full' );
$prevthumb = $prevthumb[0];
$prev_img = '<img src="'.esc_url( $prevthumb ).'" class="home_top_image">';
echo $prev_img;
}
$learn_more = '';
$infos = i_get_fields( $post->ID );
if( $infos['learn_more_link'] ){
$learn_more = $infos['learn_more_link'];
}
?>
<h1><?php the_title(); ?></h1>
<div class="home_description"><?php the_content(); ?></div>
<a href="<?php echo $learn_more; ?>" class="learn_more_primary"><?php _e('Learn More'); ?></a>
</div>
</div>
<?php
}
}
?>
</div><!-- #header -->
<div id="content" class="site-content">