<!DOCTYPE html>
<html lang="ru">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    
<?php wp_head(); 
global $phone1,
        // $phone2,
        $email, 
        $adres,
        $adres_en,
        $yamap, 
        $schedule,
        // $telegram,
        // $whatsapp,
        $vk;
$phone1 =  get_field('phone1', 7);
// $phone2 =  get_field('phone_2', 7);
$email =  get_field('email',7);
// $email2 =  get_field('email_2', 7);
$adres =  get_field('adres', 7);
$adres_en =  get_field('adres_en', 7);
$yamap =  get_field('yamap', 7);
$schedule =  get_field('schedule', 7);
// $telegram =  get_field('telegram', 7);
// $whatsapp =  get_field('whatsapp', 7);
// $vk =  get_field('vk', 7); ?>
</head>
<body <?php body_class() ?>>
<?php $pageClass = 'information-page';
    if (is_front_page()) { $pageClass = 'home-page';} elseif (is_page_template('tpl-product.php')) {$pageClass = 'product-page'; }
    ?>
<div class="wrapper <?php echo $pageClass?>">
<header class="header">
        <div class="container">
            <div class="header-row">
                <div class="header-top">
                    <a href="<?php echo site_url();?>" class="header-logo">
                        <img src="<?php echo TEMPLATE_DIR; ?>/img/main/logo.png" alt="">
                    </a>
                    <div class="header-left">
                    <div class="header-info">
                        <div class="header-address">
                            <p>
                            <?php echo $adres;?>
                            </p>
                        </div>
                        <div class="header-number">
                            <a href="tel:<?php echo $phone1;?>">
                                <?php echo $phone1;?>
                            </a>
                        </div>
                        
                    </div>
                    <?php if (function_exists('pll_the_languages')): ?>
                        <div id="lang">
                            <?php
                            $languages = pll_the_languages(array(
                                'raw' => 1, // возвращает массив, а не HTML
                            ));
                            foreach ($languages as $lang) {
                                $thislang = '';
                                if ($lang['current_lang']) $thislang = 'this';
                                echo '<a href="' . esc_url($lang['url']) . '" class="lang-link lang-' . esc_attr($lang['slug']) . ' ' . $thislang .'"';
                                
                                echo '>';
                                echo '<span class="lang-name">' . esc_html($lang['name']) . '</span>';
                                echo '</a> ';
                            }
                            ?>
                        </div>
                    <?php endif; ?>
                  
                    </div>
                </div>
                <nav class="nav header-nav" data-nav-menu>
                <?php wp_nav_menu( [
	                    	'container' => false,
                            'menu_class' => 'nav-menu',
	                    	'menu' => 'Главное'
	                    ] ); ?>
                 
                    <div class="header-info">
                        <div class="header-address">
                            <p>
                            <?php echo $adres;?>
                            </p>
                        </div>
                        <div class="header-number">
                            <a href="tel:<?php echo $phone1;?>">
                                <?php echo $phone1;?>
                            </a>
                        </div>
                    </div>
                </nav>
                <button class="header-burger" data-burger-button>
                    <span></span>
                    <span></span>
                    <span></span>
                </button>
            </div>
        </div>
    </header>
    <main class="main">