-
-
Notifications
You must be signed in to change notification settings - Fork 21
/
header.php
64 lines (57 loc) · 2.09 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
<?php
/**
* The Header for our theme.
*
* Displays all of the <head> section and everything up till <div id="main">
*
* @package Autonomie
* @since Autonomie 1.0.0
*/
?><!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="http://microformats.org/profile/specs" />
<link rel="profile" href="http://microformats.org/profile/hatom" />
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?><?php autonomie_semantics( 'body' ); ?>>
<?php
/**
* @see: https://make.wordpress.org/core/2019/04/24/miscellaneous-developer-updates-in-5-2/
*/
if ( function_exists( 'wp_body_open' ) ) {
wp_body_open();
} else {
do_action( 'wp_body_open' );
}
?>
<div id="page">
<div class="skip-link screen-reader-text"><a href="#content" title="<?php esc_attr_e( 'Skip to content', 'autonomie' ); ?>"><?php _e( 'Skip to content', 'autonomie' ); ?></a></div>
<?php do_action( 'before' ); ?>
<header id="site-header" class="site-header">
<div class="site-branding">
<?php
if ( has_custom_logo() ) {
echo get_custom_logo();
}
if ( is_home() ) {
$site_title_element = 'h1';
} else {
$site_title_element = 'div';
}
?>
<<?php echo $site_title_element; ?> id="site-title"<?php autonomie_semantics( 'site-title' ); ?>>
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"<?php autonomie_semantics( 'site-url' ); ?>>
<?php bloginfo( 'name' ); ?>
</a>
</<?php echo $site_title_element; ?>>
<?php get_search_form( true ); ?>
</div>
<nav id="site-navigation" class="site-navigation">
<button class="menu-toggle" aria-controls="site-navigation" aria-expanded="false"><?php esc_html_e( 'Primary Menu', 'autonomie' ); ?></button>
<?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>
</nav><!-- #site-navigation -->
<?php get_template_part( 'template-parts/page-banner', autonomie_get_archive_type() ); ?>
</header><!-- #site-header -->