-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathheader.php
More file actions
50 lines (40 loc) · 1.58 KB
/
header.php
File metadata and controls
50 lines (40 loc) · 1.58 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
<?php
/**
* Template to display the header
*/
?><!DOCTYPE html>
<html class="no-js" <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo('charset'); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="profile" href="https://gmpg.org/xfn/11">
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<?php wp_body_open(); ?>
<header id="site-header" role="banner">
<div class="header-titles">
<a class="site-title" href="<?php echo esc_url(get_home_url(null, '/')) ?>">
<?php echo esc_html(get_bloginfo('name')); ?>
</a>
<?php if ($description = get_bloginfo('description')): ?>
<p class="site-description"><?php echo $description; ?></p>
<?php endif; ?>
</div>
<div class="header-controls">
<nav aria-label="<?php esc_attr_e('Main menu', 'mt'); ?>" role="navigation">
<ul class="primary-menu">
<?php if (has_nav_menu('primary')): ?>
<?php wp_nav_menu([
'container' => '',
'items_wrap' => '%3$s',
'theme_location' => 'primary',
]); ?>
<?php else: ?>
<?php wp_list_pages(['title_li' => false]); ?>
<?php endif; ?>
</ul>
</nav>
<?php get_search_form(['label' => __('Search for:', 'mt')]); ?>
</div>
</header>