-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathheader.php
More file actions
57 lines (53 loc) · 1.85 KB
/
Copy pathheader.php
File metadata and controls
57 lines (53 loc) · 1.85 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
<?php
/**
* Norton Simple — Header
*
* @package Norton_Simple
*/
defined( 'ABSPATH' ) || exit;
?>
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<?php wp_body_open(); ?>
<a class="skip-link screen-reader-text" href="#main"><?php esc_html_e( 'Skip to content', 'norton-simple' ); ?></a>
<header class="site-header">
<?php
// The site name is the document's h1 only on the front page; elsewhere the
// entry title owns that level.
$norton_title_tag = ( is_front_page() && is_home() ) ? 'h1' : 'p';
printf(
'<%1$s class="site-title"><a href="%2$s" rel="home">%3$s</a></%1$s>',
esc_html( $norton_title_tag ),
esc_url( home_url( '/' ) ),
esc_html( get_bloginfo( 'name' ) )
);
?>
<?php $norton_description = get_bloginfo( 'description', 'display' ); ?>
<?php if ( $norton_description || is_customize_preview() ) : ?>
<p class="site-description"><?php echo esc_html( $norton_description ); ?></p>
<?php endif; ?>
</header>
<nav class="main-navigation" aria-label="<?php esc_attr_e( 'Primary Navigation', 'norton-simple' ); ?>">
<?php
/*
* Core's Walker_Nav_Menu already emits aria-current on the current item,
* the menu item classes, and target/rel/title attributes, and it handles
* submenus. The DOS menu-strip look comes from CSS, not from stripping
* the list markup.
*/
wp_nav_menu( array(
'theme_location' => 'primary',
'container' => false,
'menu_class' => 'nav-menu',
'menu_id' => 'primary-menu',
'depth' => 2,
'fallback_cb' => 'norton_simple_menu_fallback',
) );
?>
</nav>