-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathheader.php
executable file
·138 lines (137 loc) · 5.13 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
<?php
/**
* The Header for our theme.
*
* Displays all of the <head> section and everything up till #main div
*
* @package Odin
* @since 2.2.0
*/
?><!DOCTYPE html>
<html class="no-js" <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="profile" href="http://gmpg.org/xfn/11" />
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
<?php if ( ! get_option( 'site_icon' ) ) : ?>
<link href="<?php echo get_template_directory_uri(); ?>/assets/images/favicon.ico" rel="shortcut icon" />
<?php endif; ?>
<!--[if lt IE 9]>
<script src="<?php echo get_template_directory_uri(); ?>/assets/js/html5.js"></script>
<![endif]-->
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<?php if ( $value = get_theme_mod( 'code_open_body', false ) ) : ?>
<?php echo html_entity_decode( $value );?>
<?php endif;?>
<a id="skippy" class="sr-only sr-only-focusable" href="#content">
<div class="container">
<span class="skiplink-text"><?php _e( 'Skip to content', 'odin' ); ?></span>
</div>
</a>
<div class="prices-warn">
<div class="container">
<div class="row">
<div class="pull-left text">
<?php if ( is_user_logged_in() ) : ?>
<?php echo get_theme_mod( 'header_warn_logged', '' );?>
<?php else : ?>
<?php echo get_theme_mod( 'header_warn_unlogged', '' );?>
<?php endif;?>
</div><!-- .col-md-6 pull-left -->
<div class="pull-right text">
<?php if ( $value = get_theme_mod( 'phone', false ) ) : ?>
<i class="fa fa-phone"></i>
<div class="pull-left phones">
<a class="phone icon"><?php echo apply_filters( 'the_title', $value );?></a>
</div>
<?php endif; ?>
<?php if ( $value = get_theme_mod( 'whatsapp', false ) ) : ?>
<i class="fa fa-whatsapp"></i>
<div class="pull-left phones">
<a class="whatsapp icon"><?php echo apply_filters( 'the_title', $value );?></a>
</div>
<?php endif; ?>
</div><!-- .col-md-4 pull-right text -->
</div><!-- .row -->
</div><!-- .container -->
</div><!-- .col-md-12 prices-warn -->
<header id="header" role="banner">
<div class="container">
<div class="header-image col-md-4 col-xs-12 mobile-thing">
<?php
$header_image = get_header_image();
if ( ! empty( $header_image ) ) :
?>
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" class="mobile-thing">
<img src="<?php echo esc_url( $header_image ); ?>" height="<?php esc_attr_e( $header_image->height ); ?>" width="<?php esc_attr_e( $header_image->width ); ?>" alt="" class="col-xs-7 col-md-12"/>
</a>
<?php endif; ?>
</div><!-- .site-header-->
<div class="col-md-7 col-xs-12 pull-right">
<div class="col-md-8 col-xs-12 pull-left search-form">
<?php get_search_form( true );?>
</div><!-- .col-md-7 pull-left search-form -->
<div class="col-md-4 col-xs-12 pull-right woocommerce-infos">
<?php get_template_part( 'parts/wc-infos' );?>
</div><!-- .col-md-4 pull-right -->
</div><!-- .col-md-6 pull-right -->
<div class="menu-institucional hidden-xs">
<?php echo wp_nav_menu(
array(
'theme_location' => 'institucional',
'depth' => 2,
'container' => false,
'menu_class' => 'nav navbar-nav',
'fallback_cb' => 'Odin_Bootstrap_Nav_Walker::fallback',
'walker' => new Odin_Bootstrap_Nav_Walker()
)
);
?>
</div><!-- .col-md-6 pull-right menu-institucional -->
<?php if ( aboaterra_show_menu() ) : ?>
<div id="main-navigation" class="navbar navbar-default">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-main-navigation">
<span class="sr-only"><?php _e( 'Toggle navigation', 'odin' ); ?></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand visible-xs-block" href="<?php echo home_url(); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home">
<?php bloginfo( 'name' ); ?>
</a>
</div>
<nav class="collapse navbar-collapse navbar-main-navigation" role="navigation">
<?php
wp_nav_menu(
array(
'theme_location' => 'main-menu',
'depth' => 2,
'container' => false,
'menu_class' => 'nav navbar-nav',
'fallback_cb' => 'Odin_Bootstrap_Boaterra_Nav_Walker::fallback',
'walker' => new Odin_Bootstrap_Boaterra_Nav_Walker()
)
);
?>
<div class="default-hidden">
<?php echo wp_nav_menu(
array(
'theme_location' => 'institucional',
'depth' => 2,
'container' => false,
'menu_class' => 'nav navbar-nav',
'fallback_cb' => 'Odin_Bootstrap_Nav_Walker::fallback',
'walker' => new Odin_Bootstrap_Nav_Walker()
)
);
?>
</div>
</nav><!-- .navbar-collapse -->
</div><!-- #main-navigation-->
<?php endif;?>
</div><!-- .container-->
</header><!-- #header -->