-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathheader.php
99 lines (78 loc) · 2.2 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
<?php
/**
* Header Template
*
* Display the site header content (logo, site title, description).
*
* @link https://developer.wordpress.org/themes/template-files-section/partial-and-miscellaneous-template-files/#header-php
* @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
*
* @package Granule
* @subpackage TemplatePart
* @author Ben Gillbanks <[email protected]>
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU Public License
*/
/**
* Split the document head into a separate file so that it can more easily be included in different templates.
* For example templates that don't include the default site header layout.
*/
get_template_part( 'parts/head' );
?>
<body <?php body_class(); ?>>
<?php wp_body_open(); ?>
<div class="webpage">
<a href="#site-content" class="screen-reader-shortcut"><?php esc_html_e( 'Skip to content', 'granule' ); ?></a>
<header class="site-header" id="header" role="banner">
<?php the_custom_logo(); ?>
<div class="branding">
<?php
if ( is_front_page() && ! is_paged() ) {
?>
<h1 class="site-title">
<?php bloginfo( 'name' ); ?>
</h1>
<?php
} else {
?>
<p class="site-title">
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a>
</p>
<?php
}
// Get site description.
$description = get_bloginfo( 'description', 'display' );
if ( $description || is_customize_preview() ) {
?>
<p class="site-description">
<?php echo $description; /* WPCS: xss ok. */ ?>
</p>
<?php
}
?>
</div>
<nav class="menu menu-primary" aria-label="<?php esc_attr_e( 'Primary Menu', 'granule' ); ?>">
<button class="menu-toggle" type="button" aria-controls="primary-menu" aria-expanded="false">
<?php
granule_svg( 'menu-rows' );
esc_html_e( 'Menu', 'granule' );
?>
</button>
<?php
wp_nav_menu(
array(
'theme_location' => 'menu-1',
'menu_id' => 'nav',
'menu_class' => 'menu-wrap',
'container' => false,
'item_spacing' => 'discard',
'fallback_cb' => false,
)
);
?>
</nav>
</header>
<?php do_action( 'before' ); ?>
<div class="container" id="site-content">
<?php
granule_header();
get_template_part( 'parts/jetpack-featured-content' );