3 * The template for displaying the header
5 * Displays all of the head element and everything up until the "site-content" div.
8 * @subpackage Twenty_Sixteen
9 * @since Twenty Sixteen 1.0
13 <html <?php language_attributes(); ?> class="no-js">
15 <meta charset="<?php bloginfo( 'charset' ); ?>">
16 <meta name="viewport" content="width=device-width, initial-scale=1">
17 <link rel="profile" href="http://gmpg.org/xfn/11">
18 <?php if ( is_singular() && pings_open( get_queried_object() ) ) : ?>
19 <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
24 <body <?php body_class(); ?>>
25 <div id="page" class="site">
26 <div class="site-inner">
27 <a class="skip-link screen-reader-text" href="#content"><?php _e( 'Skip to content', 'twentysixteen' ); ?></a>
29 <header id="masthead" class="site-header" role="banner">
30 <div class="site-header-main">
31 <div class="site-branding">
32 <?php if ( is_front_page() && is_home() ) : ?>
33 <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
35 <p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
38 $description = get_bloginfo( 'description', 'display' );
39 if ( $description || is_customize_preview() ) : ?>
40 <p class="site-description"><?php echo $description; ?></p>
42 </div><!-- .site-branding -->
44 <?php if ( has_nav_menu( 'primary' ) || has_nav_menu( 'social' ) ) : ?>
45 <button id="menu-toggle" class="menu-toggle"><?php _e( 'Menu', 'twentysixteen' ); ?></button>
47 <div id="site-header-menu" class="site-header-menu">
48 <?php if ( has_nav_menu( 'primary' ) ) : ?>
49 <nav id="site-navigation" class="main-navigation" role="navigation" aria-label="<?php _e( 'Primary Menu', 'twentysixteen' ); ?>">
52 'theme_location' => 'primary',
53 'menu_class' => 'primary-menu',
56 </nav><!-- .main-navigation -->
59 <?php if ( has_nav_menu( 'social' ) ) : ?>
60 <nav id="social-navigation" class="social-navigation" role="navigation" aria-label="<?php _e( 'Social Links Menu', 'twentysixteen' ); ?>">
63 'theme_location' => 'social',
64 'menu_class' => 'social-links-menu',
66 'link_before' => '<span class="screen-reader-text">',
67 'link_after' => '</span>',
70 </nav><!-- .social-navigation -->
72 </div><!-- .site-header-menu -->
74 </div><!-- .site-header-main -->
76 <?php if ( get_header_image() ) : ?>
79 * Filter the default twentysixteen custom header sizes attribute.
81 * @since Twenty Sixteen 1.0
83 * @param string $custom_header_sizes sizes attribute
84 * for Custom Header. Default '(max-width: 709px) 85vw,
85 * (max-width: 909px) 81vw, (max-width: 1362px) 88vw, 1200px'.
87 $custom_header_sizes = apply_filters( 'twentysixteen_custom_header_sizes', '(max-width: 709px) 85vw, (max-width: 909px) 81vw, (max-width: 1362px) 88vw, 1200px' );
89 <div class="header-image">
90 <a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home">
91 <img src="<?php header_image(); ?>" srcset="<?php echo esc_attr( wp_get_attachment_image_srcset( get_custom_header()->attachment_id ) ); ?>" sizes="<?php echo esc_attr( $custom_header_sizes ); ?>" width="<?php echo esc_attr( get_custom_header()->width ); ?>" height="<?php echo esc_attr( get_custom_header()->height ); ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>">
94 <?php endif; // End header image check. ?>
95 </header><!-- .site-header -->
97 <div id="content" class="site-content">