<?php

/**
 * The header for our theme
 * This is the template that displays all of the <head> section and everything up until <div id="site-content">
 * @package Glaciers
 * @since 1.0.0
 */

if (!defined('ABSPATH')) {
	exit; // Exit if accessed directly.
}


// Are the options activated in the customizer.		
$glaciers_hide_search_modal = get_theme_mod('glaciers_hide_search_modal', false);
?>
<!doctype html>
<html <?php language_attributes(); ?>>

<head>
	<meta charset="<?php bloginfo('charset'); ?>">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<link rel="profile" href="https://gmpg.org/xfn/11">

	<?php wp_head(); ?>
</head>

<body <?php body_class(); ?>>

	<?php if (false === $glaciers_hide_search_modal) {
		get_template_part('template-parts/modal-search');
	}
	?>

	<?php if (function_exists('wp_body_open')) {
		wp_body_open();
	}
	?>

	<a class="visually-hidden-focusable skip-link" href="#primary"><?php esc_html_e('Skip to Content', 'glaciers'); ?></a>

	<div id="page">

		<?php // Glaciers header hook.
		do_action('glaciers_site_header');

		// Load the banner sidebar only on pages
		if (is_page()) {
			get_template_part('template-parts/sidebars/sidebar', 'banner');
		}

		// Action hook for a slider plugin and the home heading area
		if (is_home()) {
			do_action('glaciers_featured_slider');
			do_action('glaciers_blog_home_heading');
		}

		// Hook for page headers 
		do_action('glaciers_page_header');
		?>

		<main id="main" class="site-main">

			<?php if (!is_page_template('elementor_header_footer')) { ?>
				<section id="content">
				<?php
			} ?>