<!doctype html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="profile" href="https://gmpg.org/xfn/11">
<meta name="theme-color" content="#505050">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,wght@0,600;0,700;1,400&family=Sora:wght@700&display=swap" rel="stylesheet">
<?php the_field('code_header', 'option'); ?>
<?php wp_head(); ?>
<?php
$accent_color = get_field( 'accent_color', 'options' ) ?: '#6777D9';
$accent_color_active = get_field( 'accent_color_active', 'options' ) ?: '#b20262';
$text_color = get_field( 'text_color', 'options' ) ?: '#505050';
$font_primary = get_field( 'font_primary', 'options' ) ?: 'Nunito Sans';
$font_secondary = get_field( 'font_secondary', 'options' ) ?: 'Sora';
?>
<style>
:root {
--default-font: '<?php echo esc_html_e( $font_primary ); ?>', helvetica, sans-serif;
--secondary-font: '<?php echo esc_html_e( $font_secondary ); ?>', helvetica, sans-serif;
--accent: <?php esc_html_e( $accent_color ); ?>;
--accent-active: <?php esc_html_e( $accent_color_active ); ?>;
--text: <?php esc_html_e( $text_color ); ?>;
}
</style>
</head>
<body <?php body_class(); ?>>
<?php wp_body_open(); ?>
<?php the_field('code_body', 'option'); ?>
<div id="page" class="site">
<a class="sr-only sr-only-focusable" href="#primary"><?php esc_html_e( 'Skip to content', 'dma' ); ?></a>
<header id="masthead" class="site-header">
<div class="header-inner">
<?php
$logo = get_custom_logo();
$acf_logo = get_field( 'acf_logo', 'options' );
?>
<?php if ( $acf_logo ) : ?>
<div class="site-branding">
<a href="<?php echo esc_url( home_url( '/' ) ); ?>">
<img src="<?php echo esc_url( $acf_logo ); ?>" alt="Logo">
</a>
</div>
<?php elseif ( $logo ) : ?>
<div class="site-branding">
<?php the_custom_logo(); ?>
</div>
<?php else: ?>
<div class="site-branding">
<a href="<?php echo esc_url( home_url( '/' ) ); ?>">
<img src="<?php echo get_template_directory_uri() ?>/assets/img/logo.svg" alt="Logo">
</a>
</div>
<?php endif; ?>
<nav id="site-navigation" class="main-navigation">
<?php
wp_nav_menu(
array(
'theme_location' => 'menu-1',
'menu_id' => 'primary-menu',
'menu' => '',
'container' => false,
'menu_class' => 'main-menu',
'depth' => 3,
'before' => '',
'after' => '<span class="submenu-toggle"></span>',
)
);
?>
</nav>
<button type="button" class="menu-toggle">
<svg width="24px" height="24px" xmlns="http://www.w3.org/2000/svg" fill="#1E1E1E" viewBox="0 0 24 24">
<path class="menu-btn__open" d="M0 5a2 2 0 012-2h20a2 2 0 110 4H2a2 2 0 01-2-2zm0 7a2 2 0 012-2h20a2 2 0 110 4H2a2 2 0 01-2-2zm0 7a2 2 0 012-2h20a2 2 0 110 4H2a2 2 0 01-2-2z"></path>
</svg>
</button>
<div class="menu-overlay">
<button type="button" class="close-menu-btn">
<svg width="24px" height="24px" xmlns="http://www.w3.org/2000/svg" fill="#1E1E1E" viewBox="0 0 24 24">
<path class="menu-btn__close" d="M.67.67a2.289 2.289 0 000 3.237L8.763 12 .67 20.093a2.289 2.289 0 103.237 3.237L12 15.237l8.093 8.093a2.289 2.289 0 103.237-3.237L15.237 12l8.093-8.093A2.289 2.289 0 1020.093.67L12 8.763 3.907.67A2.289 2.289 0 00.67.67z"></path>
</svg>
</button>
</div>
</div>
</header>
body_class не в том месте, он выводит классы за тегом.
язык тоже выводится функцией.
ну и скрипт я бы вставлял по другому