header.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. <?php
  23. if ( function_exists( 'wp_body_open' ) ) {
  24. wp_body_open();
  25. }
  26. ?>
  27. <div id="page" class="site">
  28. <a class="skip-link screen-reader-text" href="#content"><?php _e( 'Skip to content', 'varia' ); ?></a>
  29. <?php
  30. if ( ( true === get_theme_mod( 'hide_site_header', false ) && is_front_page() && is_page() ) ) {
  31. // Do nothing if this is the homepage and the hide-header setting is active.
  32. } elseif ( class_exists( 'A8C\FSE\WP_Template' ) ) { // If not, check if the FSE plugin is active, use the Header template for content.
  33. get_template_part( 'template-parts/header/fse', 'header' );
  34. } else { // Otherwise we'll fallback to the default Varia header below.
  35. get_template_part( 'template-parts/header/header', 'content' );
  36. }
  37. ?>
  38. <div id="content" class="site-content">