header.php 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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', 'varia' ); ?></a>
  24. <?php if ( class_exists( 'A8C\FSE\WP_Template' ) ) : // If the FSE plugin is active, use the Header template for content. ?>
  25. <header id="masthead" class="fse-template-part fse-header entry-content">
  26. <?php
  27. $template = new A8C\FSE\WP_Template();
  28. $template->output_template_content( A8C\FSE\WP_Template::HEADER );
  29. ?>
  30. </header>
  31. <?php else : // Otherwise we'll fallback to the default Stow header below. ?>
  32. <header id="masthead" class="site-header">
  33. <?php get_template_part( 'template-parts/header/site', 'branding' ); ?>
  34. <?php if ( has_nav_menu( 'menu-1' ) ) : ?>
  35. <nav id="site-navigation" class="main-navigation" aria-label="<?php esc_attr_e( 'Main Navigation', 'varia' ); ?>">
  36. <input type="checkbox" role="button" aria-haspopup="true" id="toggle" class="hide-visually">
  37. <label for="toggle" id="toggle-menu" class="button">
  38. <?php _e( 'Menu', 'varia' ); ?>
  39. <span class="dropdown-icon open">+</span>
  40. <span class="dropdown-icon close">&times;</span>
  41. <span class="hide-visually expanded-text"><?php _e( 'expanded', 'varia' ); ?></span>
  42. <span class="hide-visually collapsed-text"><?php _e( 'collapsed', 'varia' ); ?></span>
  43. </label>
  44. <?php
  45. wp_nav_menu(
  46. array(
  47. 'theme_location' => 'menu-1',
  48. 'menu_class' => 'main-menu',
  49. 'items_wrap' => '<ul id="%1$s" class="%2$s" aria-label="submenu">%3$s</ul>',
  50. )
  51. );
  52. ?>
  53. </nav><!-- #site-navigation -->
  54. <?php endif; ?>
  55. <?php if ( has_nav_menu( 'social' ) ) : ?>
  56. <nav class="social-navigation" aria-label="<?php esc_attr_e( 'Social Links Menu', 'varia' ); ?>">
  57. <?php
  58. wp_nav_menu(
  59. array(
  60. 'theme_location' => 'social',
  61. 'menu_class' => 'social-links-menu',
  62. 'link_before' => '<span class="screen-reader-text">',
  63. 'link_after' => '</span>' . varia_get_icon_svg( 'link' ),
  64. 'depth' => 1,
  65. )
  66. );
  67. ?>
  68. </nav><!-- .social-navigation -->
  69. <?php endif; ?>
  70. </header><!-- #masthead -->
  71. <?php endif; ?>
  72. <div id="content" class="site-content">