header.php 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. /**
  3. * The header for our theme
  4. *
  5. * This is the template that displays all of the <head> section and everything up until <div id="content">
  6. *
  7. * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
  8. *
  9. * @package WordPress
  10. * @subpackage Varia
  11. * @since 1.0.0
  12. */
  13. ?><!doctype html>
  14. <html <?php language_attributes(); ?>>
  15. <head>
  16. <meta charset="<?php bloginfo( 'charset' ); ?>" />
  17. <meta name="viewport" content="width=device-width, initial-scale=1" />
  18. <link rel="profile" href="https://gmpg.org/xfn/11" />
  19. <?php wp_head(); ?>
  20. </head>
  21. <body <?php body_class(); ?>>
  22. <div id="page" class="site">
  23. <a class="skip-link screen-reader-text" href="#content"><?php _e( 'Skip to content', 'rockfield' ); ?></a>
  24. <header id="masthead" class="site-header">
  25. <?php get_template_part( 'template-parts/header/site', 'branding' ); ?>
  26. <?php if ( has_nav_menu( 'menu-1' ) ) : ?>
  27. <nav id="site-navigation" class="main-navigation" aria-label="<?php esc_attr_e( 'Main Navigation', 'rockfield' ); ?>">
  28. <input type="checkbox" role="button" aria-haspopup="true" id="toggle" class="hide-visually">
  29. <label for="toggle" id="toggle-menu" class="button">
  30. <?php _e( 'Menu', 'rockfield' ); ?>
  31. <span class="hide-visually expanded-text"><?php _e( 'expanded', 'rockfield' ); ?></span>
  32. <span class="hide-visually collapsed-text"><?php _e( 'collapsed', 'rockfield' ); ?></span>
  33. </label>
  34. <?php
  35. wp_nav_menu(
  36. array(
  37. 'theme_location' => 'menu-1',
  38. 'menu_class' => 'main-menu',
  39. 'items_wrap' => '<ul id="%1$s" class="%2$s" aria-label="submenu">%3$s</ul>',
  40. )
  41. );
  42. ?>
  43. </nav><!-- #site-navigation -->
  44. <?php endif; ?>
  45. </header><!-- #masthead -->
  46. <div id="content" class="site-content">