-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheader.php
61 lines (48 loc) · 1.5 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
<?php
/**
* The header for our theme
*
* @package WordPress
* @subpackage skltn
* @since skltn 0.1
*/
?><!DOCTYPE html>
<html prefix="og: http://ogp.me/ns#" <?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('site-body'); ?>>
<?php wp_body_open(); ?>
<div class="page-wrapper">
<header class="site-header">
<a class="site-header__skip-link" href="#site-main">Skip to content</a>
<?php
$skltn_logo_html = '<%1$s class="site-header__logo"><a href="' . esc_url( home_url() ) . '">' . esc_html( get_bloginfo( 'name' ) ) . '</a></%1$s>';
$skltn_logo_tag = ( is_front_page() || is_home() ) && ! is_page() ? 'h1' : 'p';
echo sprintf( $skltn_logo_html, $skltn_logo_tag ); //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
?>
<?php
if ( !empty( get_bloginfo( 'description' ) ) ) {
?>
<p class="site-header__tagline">
<?php bloginfo( 'description' ); ?>
</p>
<?php
}
?>
<?php
wp_nav_menu(
array(
'theme_location' => 'header',
'container' => 'nav',
'fallback_cb' => false,
'depth' => 1,
'container_class' => 'site-nav',
'items_wrap' => '<ul id="%1$s" class="%2$s site-nav__list">%3$s</ul>',
)
);
?>
</header>