header.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php declare( strict_types = 1 ); ?>
  2. <?php
  3. /**
  4. * The header for our theme
  5. *
  6. * This is the template that displays all of the <head> section and everything up until <div id="content">
  7. *
  8. * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
  9. *
  10. * @package WordPress
  11. * @subpackage Varia
  12. * @since 1.0.0
  13. */
  14. ?><!doctype html>
  15. <html <?php language_attributes(); ?>>
  16. <head>
  17. <meta charset="<?php bloginfo( 'charset' ); ?>" />
  18. <meta name="viewport" content="width=device-width, initial-scale=1" />
  19. <link rel="profile" href="https://gmpg.org/xfn/11" />
  20. <?php wp_head(); ?>
  21. </head>
  22. <body <?php body_class(); ?>>
  23. <?php
  24. if ( function_exists( 'wp_body_open' ) ) {
  25. wp_body_open();
  26. }
  27. ?>
  28. <div id="page" class="site">
  29. <a class="skip-link screen-reader-text" href="#content"><?php _e( 'Skip to content', 'varia' ); ?></a>
  30. <?php
  31. if ( ( true === get_theme_mod( 'hide_site_header', false ) && is_front_page() && is_page() ) ) {
  32. // Do nothing if this is the homepage and the hide-header setting is active.
  33. } elseif ( class_exists( 'A8C\FSE\WP_Template' ) ) { // If not, check if the FSE plugin is active, use the Header template for content.
  34. get_template_part( 'template-parts/header/fse', 'header' );
  35. } else { // Otherwise we'll fallback to the default Varia header below.
  36. get_template_part( 'template-parts/header/header', 'content' );
  37. }
  38. ?>
  39. <div id="content" class="site-content">