-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathheader.php
More file actions
48 lines (42 loc) · 1.44 KB
/
header.php
File metadata and controls
48 lines (42 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo('charset'); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<?php
$has_elementor_header = function_exists('elementor_theme_do_location') && elementor_theme_do_location('header');
$has_crocoblock_header = false;
if ( function_exists('jet_theme_core') && is_object(jet_theme_core()) && isset(jet_theme_core()->frontend) ) {
$has_crocoblock_header = jet_theme_core()->frontend->has_location('header');
}
if ( ! $has_elementor_header && ! $has_crocoblock_header ) :
?>
<header class="site-header">
<div class="container header-flex">
<div class="site-branding">
<?php
if (has_custom_logo()) {
the_custom_logo();
} else {
echo '<h1>' . get_bloginfo('name') . '</h1>';
}
?>
</div>
<nav class="primary-nav">
<div class="menu-container">
<?php
wp_nav_menu([
'theme_location' => 'primary',
'container' => false,
'menu_class' => 'main-menu',
'fallback_cb' => false,
]);
?>
</div>
</nav>
</div>
</header>
<?php endif; ?>