-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathheader.php
More file actions
88 lines (87 loc) · 3.48 KB
/
header.php
File metadata and controls
88 lines (87 loc) · 3.48 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
<?php
/**
* The header for our theme
*
* This is the template that displays all of the <head> section and everything up until <header>
*
* @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
*
* @package Fancy Lab
*/
?>
<!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(); ?>>
<div id="page" class="site">
<header>
<section class="search">
<div class="container">
<div class="text-center d-md-flex align-items-center"></div>
<?php get_search_form(); ?>
</div>
</section>
<section class="top-bar">
<div class="container">
<div class="row">
<div class="brand col-md-3 col-12 col-lg-2 text-center text-md-left">
<?php if( has_custom_logo() ): ?>
<a href="<?php echo home_url( '/' ) ?>"><?php the_custom_logo(); ?></a>
<?php else: ?>
<p class="site-title"><?php bloginfo('title') ?></p>
<span><?php bloginfo( 'description' ) ?></span>
<?php endif; ?>
</div>
<div class="second-column col-md-9 col-12 col-lg-10">
<?php if( class_exists( 'WooCommerce' ) ): ?>
<div class="account col-12">
<div class="navbar-expand">
<ul class="navbar-nav float-left">
<?php if( is_user_logged_in() ): ?>
<li>
<a href="<?php echo esc_url( get_permalink( get_option( 'woocommerce_myaccount_page_id' ) ) ); ?>" class="nav-link">Minha Conta</a>
</li>
<li>
<a href="<?php echo esc_url( wp_logout_url( get_permalink( get_option( 'woocommerce_myaccount_page_id' ) ) ) ); ?>" class="nav-link">Sair</a>
</li>
<?php else: ?>
<li>
<a href="<?php echo esc_url( get_permalink( get_option( 'woocommerce_myaccount_page_id' ) ) ); ?>" class="nav-link">Criar Conta</a>
</li>
<?php endif; ?>
</ul>
</div>
<div class="cart text-right">
<a href="<?php echo wc_get_cart_url(); ?>"><span class="cart-icon"></span></a>
<span class="items"><?php echo WC()->cart->get_cart_contents_count(); ?></span>
</div>
</div>
<?php endif; ?>
<nav class="main-menu navbar navbar-expand-md navbar-light" role="navigation">
<!-- Brand and toggle get grouped for better mobile display -->
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-controls="bs-example-navbar-collapse-1" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<?php
wp_nav_menu( array(
'theme_location' => 'fancy_lab_main_menu',
'depth' => 3,
'container' => 'div',
'container_class' => 'collapse navbar-collapse',
'container_id' => 'bs-example-navbar-collapse-1',
'menu_class' => 'nav navbar-nav',
'fallback_cb' => 'WP_Bootstrap_Navwalker::fallback',
'walker' => new WP_Bootstrap_Navwalker(),
) );
?>
</nav>
</div>
</div>
</div>
</section>
</header>