This repository has been archived by the owner on Jan 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathheader.php
142 lines (127 loc) · 5.26 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
<?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 Cali
*/
?>
<!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">
<?php wp_head(); ?>
</head>
<body <?php body_class( 'header-is-sticky' ); ?>>
<div id="page" class="site">
<a class="skip-link screen-reader-text" href="#content"><?php esc_html_e( 'Skip to content', 'cali' ); ?></a>
<header id="masthead" class="site-header">
<div class="header-top clearfix ca-header-shadow--desktop">
<div class="container-fluid">
<div class="row">
<div class="ca-header-shadow--mobile clearfix">
<div class="col-xs-3 col-sm-2 ca-hide-on-desktop header-mobile-menu__wrap">
<div class="header-mobile-menu">
<button class="mobile-menu-toggle" aria-controls="primary-menu">
<span class="mobile-menu-toggle_lines"></span>
<span class="sr-only"><?php esc_html_e( 'Toggle mobile menu', 'cali' ); ?></span>
</button>
</div>
</div><!-- /.header-mobile-menu -->
<div class="col-xs-12 col-sm-8 ca-hide-on-desktop">
<div class="site-branding site-branding--mobile">
<?php the_custom_logo(); ?>
<?php if ( is_front_page() && is_home() ) : ?>
<h1 class="site-title--mobile"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
<?php else : ?>
<p class="site-title--mobile"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
<?php endif; ?>
</div><!-- .site-branding--mobile -->
</div>
<div class="col-xs-3 col-sm-2 ca-hide-on-desktop pull-right secondary-navigation__wrap secondary-navigation__wrap--mobile-top">
<div class="secondary-navigation">
<?php
$show_wc_cart = get_theme_mod( 'cali_show_wc_cart', 1 );
if ( class_exists( 'Woocommerce' ) && $show_wc_cart ) :
// Mobile WooCommerce Cart dropdown
get_template_part( 'template-parts/content', 'wc_cart_mini' );
endif; //end Woocommerce class_exists check ?>
</div>
</div>
</div>
<div class="col-xs-12 main-navigation_wrap">
<div class="row">
<div class="col-xs-12 col-lg-2 pull-right secondary-navigation__wrap secondary-navigation__wrap--desktop-top">
<div class="secondary-navigation">
<div class="site-search__wrap site-search__wrap--header">
<?php get_search_form(); ?>
</div>
<div class="ca-hide-on-mobile">
<?php
if ( class_exists( 'Woocommerce' ) && $show_wc_cart ) :
// Desktop WooCommerce Cart dropdown
get_template_part( 'template-parts/content', 'wc_cart_mini' );
endif; //end Woocommerce class_exists check ?>
</div>
</div>
</div>
<div class="col-xs-12 col-lg-8 col-lg-push-2">
<nav id="site-navigation" class="main-navigation" role="navigation">
<?php
wp_nav_menu( array(
'theme_location' => 'menu-1',
'menu_id' => 'primary-menu',
) );
?>
</nav><!-- #site-navigation -->
</div>
<div class="col-xs-12 col-lg-2 col-lg-pull-8 social-navigation__wrap">
<nav class="social-navigation social-links clearfix">
<?php
wp_nav_menu( array(
'theme_location' => 'menu-social-header',
'link_before' => '<span class="screen-reader-text">',
'link_after' => '</span>',
'menu_id' => 'social-header-menu',
'fallback_cb' => false
) );
?>
</nav>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="site-branding site-branding--desktop ca-hide-on-mobile">
<?php the_custom_logo(); ?>
<?php if ( is_front_page() && is_home() ) : ?>
<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
<?php else : ?>
<p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
<?php endif; ?>
<?php $cali_description = get_bloginfo( 'description', 'display' );
if ( $cali_description || is_customize_preview() ) :
?>
<p class="site-description"><?php echo $cali_description; /* WPCS: xss ok. */ ?></p>
<?php endif; ?>
</div><!-- .site-branding--desktop -->
</header><!-- #masthead -->
<div id="content" class="site-content"><!-- ends in footer.php -->
<?php
// include post slider on home.php ie. blog post home page
if ( is_home() ) :
get_template_part( 'template-parts/content', 'slider_article' );
endif;
// show breadcrumbs on every page except front page
if ( ! is_front_page() ) :
get_template_part( 'template-parts/content', 'breadcrumbs' );
endif;
?>
<div class="container clearfix"><!-- ends in footer.php -->
<div class="row"><!-- ends in footer.php -->