forked from pressden/emma
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathheader.php
More file actions
114 lines (94 loc) · 3.38 KB
/
header.php
File metadata and controls
114 lines (94 loc) · 3.38 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
<?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 Emma
*/
?>
<!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(); ?>>
<?php
/**
* Fires immediately after the body element opening markup.
*
* @since 1.0.0
*/
do_action( 'emma_before' );
?>
<div id="page" class="site">
<a class="skip-link screen-reader-shortcut" href="#content" tabindex="2"><?php esc_html_e( 'Skip to content', 'emma' ); ?></a>
<header id="masthead" class="site-header">
<?php get_template_part( 'template-parts/utility', 'bar' ); ?>
<div class="wrap">
<?php if ( has_nav_menu( 'left' ) ) : ?>
<nav id="left-navigation" class="site-navigation split-navigation split-left-navigation">
<?php
wp_nav_menu( array(
'theme_location' => 'left',
'menu_id' => 'left-menu',
'container_class' => 'menu-container',
) );
?>
</nav><!-- #left-navigation -->
<?php endif; ?>
<div class="site-branding">
<?php the_custom_logo(); ?>
<p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
<?php
$emma_description = get_bloginfo( 'description', 'display' );
if ( $emma_description || is_customize_preview() ) :
?>
<p class="site-description"><?php echo $emma_description; /* WPCS: xss ok. */ ?></p>
<?php endif; ?>
</div><!-- .site-branding -->
<?php if ( has_nav_menu( 'right' ) ) : ?>
<nav id="right-navigation" class="site-navigation split-navigation split-right-navigation">
<?php
wp_nav_menu( array(
'theme_location' => 'right',
'menu_id' => 'right-menu',
'container_class' => 'menu-container',
) );
?>
</nav><!-- #right-navigation -->
<?php endif; ?>
<?php
if ( is_active_sidebar( 'header-widgets' ) ) {
?>
<div id="header-widgets" class="header-widgets">
<?php dynamic_sidebar( 'header-widgets' ); ?>
</div>
<?php
}
?>
<div class="navigation-controls">
<a href="javascript:void(0);" id="menu-toggle" class="menu-toggle" aria-controls="menu-drawer" aria-expanded="false" title="<?php esc_html_e( 'Primary Menu', 'emma' ); ?>">
<span class="dashicons dashicons-menu-alt"></span>
</a>
</div><!-- .navigation-controls -->
</div><!-- .wrap -->
</header><!-- #masthead -->
<div id="sticky-saver" class="sticky-saver"></div>
<?php if ( has_nav_menu( 'primary' ) ) : ?>
<nav id="main-navigation" class="site-navigation main-navigation">
<?php
wp_nav_menu( array(
'theme_location' => 'primary',
'menu_id' => 'primary-menu',
'container_class' => 'menu-container',
) );
?>
</nav><!-- #main-navigation -->
<?php endif; ?>
<div id="content" class="site-content">