-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathheader.php
More file actions
130 lines (90 loc) · 6.06 KB
/
header.php
File metadata and controls
130 lines (90 loc) · 6.06 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
<?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 relia
*/
?><!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="http://gmpg.org/xfn/11">
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<div id="page" class="hfeed site">
<a class="skip-link screen-reader-text" href="#content"><?php esc_html_e( 'Skip to content', 'relia' ); ?></a>
<header id="masthead" class="site-header" role="banner">
<?php if ( get_theme_mod( 'relia_header_background_type', 'image' ) == 'image' ) : ?>
<section class="page-header-block" style="background-image: url('<?php echo esc_url( get_theme_mod( 'relia_header_image', get_template_directory_uri() . '/inc/images/page-header-bg.jpg' ) ); ?>');">
<?php else : ?>
<section class="page-header-block">
<?php endif; ?>
<div class="container">
<div class="row">
<div class="col-md-12 align-left">
<h1 class="header-title wow fadeIn <?php echo get_theme_mod( 'relia_logo_or_title', 'title' ) == 'title' ? '' : 'relia-hidden' ; ?>">
<a href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php bloginfo( 'name' ); ?></a>
</h1>
<a href="<?php echo esc_url( home_url( '/' ) ); ?>"><img src="<?php echo esc_url( get_theme_mod( 'relia_header_logo', get_template_directory_uri() . '/inc/images/relia-logo.png' ) ); ?>" alt="<?php bloginfo( 'name' ); ?>"
style="height: <?php echo esc_attr( get_theme_mod( 'relia_logo_size', 50 ) ); ?>px; width: auto;"
class="header-logo wow fadeIn <?php echo get_theme_mod( 'relia_logo_or_title', 'title' ) == 'logo' ? '' : 'relia-hidden' ; ?>"></a>
<p class="header-description wow fadeIn <?php echo get_theme_mod( 'relia_tagline_toggle', 'show' ) == 'show' ? '' : 'relia-hidden' ; ?>">
<?php bloginfo( 'description' ); ?>
</p>
<div class="search-and-cart fadeInRight <?php echo is_front_page() ? 'wow' : ''; ?>">
<?php if( class_exists( 'WooCommerce' ) && get_theme_mod( 'relia_shopping_cart_toggle', 'show') == 'show' ) : ?>
<?php if( WC()->cart->get_cart_contents_count() > 0 ) : ?>
<a class="relia-cart" href="<?php echo function_exists( 'wc_get_cart_url' ) ? wc_get_cart_url() : WC()->cart->get_cart_url(); ?>">
<span class="cart-total"><?php _e( 'Items in Cart', 'relia' ); ?> : </span>
<?php echo WC()->cart->get_cart_contents_count(); ?>
</a>
<?php endif; ?>
<?php if( get_theme_mod( 'relia_search_toggle', 'show') == 'show' ) : ?>
<i class="fa fa-search"></i>
<?php endif; ?>
<a href="<?php echo function_exists( 'wc_get_cart_url' ) ? wc_get_cart_url() : WC()->cart->get_cart_url(); ?>">
<i class="fa fa-shopping-cart"></i>
</a>
<?php else : ?>
<?php if( get_theme_mod( 'relia_search_toggle', 'show') == 'show' ) : ?>
<i class="fa fa-search"></i>
<?php endif; ?>
<?php endif; ?>
</div>
</div>
</div>
</div>
</section>
<section id="search-background">
<div id="search-form" class="wow fadeInUp">
<div class="inner">
<?php get_search_form(); ?>
</div>
</div>
</section>
<nav class="main-nav main-navigation">
<div class="container">
<?php if ( has_nav_menu( 'primary' ) ) : ?>
<?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_id' => 'primary-menu' ) ); ?>
<?php else : ?>
<div class="menu-testing-menu-container">
<ul id="primary-menu" class="menu">
<li class="menu-item menu-item-type-custom menu-item-object-custom">
<a href="<?php echo admin_url( 'nav-menus.php' ); ?>">
<?php _e( 'ADD A PRIMARY MENU', 'relia' ); ?> ?
</a>
</li>
</ul>
</div>
<?php endif; ?>
</div>
</nav>
</header><!-- #masthead -->
<div id="content" class="site-content">