-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathheader.php
More file actions
159 lines (129 loc) · 5.3 KB
/
header.php
File metadata and controls
159 lines (129 loc) · 5.3 KB
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
<?php
/**
* The header for our theme
*
* This is the template that displays all of the <head> section and everything up until <div id="content">
*
* @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
*
* @package DesignFly
*/
?>
<!doctype html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="profile" href="https://gmpg.org/xfn/11">
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?> style="background: url( <?php echo get_template_directory_uri() . '/assets/images/rapeatable-bg.png' ?>)">
<div id="page" class="site">
<a class="skip-link screen-reader-text" href="#content"><?php esc_html_e( 'Skip to content', 'designfly' ); ?></a>
<header id="masthead" class="site-header" style="background: url( <?php echo get_template_directory_uri() . '/assets/images/rapeatable-bg.png' ?>)">
<!-- Navigation bar starts here -->
<div class="container">
<nav class="navbar navbar-expand-lg navbar-light">
<?php
if ( has_custom_logo() ) :
the_custom_logo();
else :
?>
<a href=" <?php echo get_site_url(); ?> " class="custom-logo-link">
<img src=" <?php echo get_template_directory_uri() . '/assets/images/logo.png' ?> " alt="Logo" />
</a>
<?php endif; ?>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<?php
wp_nav_menu( array(
'theme_location' => 'menu-1',
'menu_id' => 'primary-menu',
'menu_class' => 'nav-menu',
) );
?>
</ul>
<form class="form-inline my-2 my-lg-0" action="<?php echo home_url( '/' ); ?>" method="get">
<input class="search-box" type="text" name="s" id="search" value="<?php the_search_query(); ?>" />
<input id="header-search-btn" type="image" alt="Search" src="<?php bloginfo( 'template_url' ); ?>/assets/images/search-icon-normal.png" />
</form>
</div> <!-- .collapse -->
</nav>
</div> <!-- .container -->
</header><!-- #masthead -->
<?php
if ( get_theme_mod( 'designfly-home-display-header' ) === true ):
if ( is_front_page() && is_home() ) :
?>
<div id="intro-container">
<div class="content">
<h1 class="site-title">
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home">
<?php bloginfo( 'name' ); ?>
</a>
</h1>
<?php
$designfly_description = get_bloginfo( 'description', 'display' );
if ( $designfly_description || is_customize_preview() ) :
?>
<p class="site-description"><?php echo $designfly_description; ?></p>
<?php endif; ?>
</div>
<?php
if ( has_header_image() ) :
?>
<div class="header-img" style="background: url( <?php echo get_header_image(); ?> )"></div>
<?php
else :
?>
<div class="header-img" style="background: url( <?php echo get_template_directory_uri() . '/assets/images/full-slider.png' ?> )"></div>
<?php endif; ?>
</div>
<hr class="break"/>
<?php
else :
?>
<?php
endif;
endif;
?>
<!-- Bottom section of header -->
<?php if ( get_theme_mod( 'designfly-features-display' ) === true ) : ?>
<div class="container-fluid features-wrapper">
<div class="container features-container">
<div class="row">
<div class="col-sm-4">
<div class="thumbnail">
<img src=" <?php echo wp_get_attachment_url( get_theme_mod( 'designfly-features-image-1' ) ); ?> "/>
</div><!-- .thumbnail -->
<div class="content">
<p class="title"> <?php echo esc_html( get_theme_mod( 'designfly-features-title-1' ) ); ?> </p>
<p class="description"> <?php echo esc_html( get_theme_mod( 'designfly-features-para-1' ) ); ?> </p>
</div><!-- .content -->
</div><!-- .col-sm-4 -->
<div class="col-sm-4">
<div class="thumbnail">
<img src=" <?php echo wp_get_attachment_url( get_theme_mod( 'designfly-features-image-2' ) ); ?> "/>
</div><!-- .thumbnail -->
<div class="content">
<p class="title"> <?php echo esc_html( get_theme_mod( 'designfly-features-title-2' ) ); ?> </p>
<p class="description"> <?php echo esc_html( get_theme_mod( 'designfly-features-para-2' ) ); ?> </p>
</div><!-- .content -->
</div><!-- .col-sm-4 -->
<div class="col-sm-4">
<div class="thumbnail">
<img src=" <?php echo wp_get_attachment_url( get_theme_mod( 'designfly-features-image-3' ) ); ?> "/>
</div><!-- .thumbnail -->
<div class="content">
<p class="title"> <?php echo esc_html( get_theme_mod( 'designfly-features-title-3' ) ); ?> </p>
<p class="description"> <?php echo esc_html( get_theme_mod( 'designfly-features-para-3' ) ); ?> </p>
</div><!-- .content -->
</div><!-- .col-sm-4 -->
</div><!-- .row -->
</div><!-- .container -->
</div><!-- .container-fluid -->
<?php endif; ?>
<div id="content" class="site-content">