File: /var/www/soreal.space/wp-content/themes/soreal/header.php
<?php
/**
* The header for our theme
*
* This is the template that displays all of the <head> section and everything up until <div id="content">
*
* @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
*
* @package soreal
*/
?>
<!doctype html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo('charset'); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="<?php echo get_template_directory_uri(); ?>/assets/css/aos.css" rel="stylesheet">
<link rel="icon" type="image/x-icon" href="">
<script async src="<?php echo get_template_directory_uri(); ?>/Build/Build.loader.js"></script>
<link rel="preload" href="<?php echo get_template_directory_uri(); ?>/Build/Build.wasm" as="fetch" type="application/wasm" crossorigin="anonymous">
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-W7XB8PMK');</script>
<!-- End Google Tag Manager -->
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-W7XB8PMK"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
<?php wp_body_open(); ?>
<?php
$header_logo = get_field('header_logo', 'option');
$cb_text = get_field('contact_button_text', 'option');
$cb_link = get_field('contact_button_link', 'option');
?>
<header class="bg-custom-dark">
<div class="container px-4 mx-auto">
<div class="flex items-center justify-between h-16 lg:h-20">
<?php if ($header_logo) { ?>
<a href="<?php echo site_url(); ?>">
<img class="h-auto w-[130px] lg:w-[150px]" src="<?php echo $header_logo['url']; ?>" alt="<?php echo $header_logo['alt']; ?>" height="28" width="150">
</a>
<?php } ?>
<?php
wp_nav_menu([
'theme_location' => 'menu-1',
'menu_class' => 'flex space-x-6 text-white font-medium',
'container' => false,
'fallback_cb' => false,
]);
?>
<?php if ( $cb_link || $cb_text ) { ?>
<div>
<button class="font-medium text-white px-4 rounded-lg hover:text-white/80 popup-trigger" id="<?php echo $cb_link; ?>" >
<?php echo $cb_text; ?>
</button>
</div>
<?php } ?>
</div>
</div>
</header>
<main>