-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheader.php
39 lines (39 loc) · 876 Bytes
/
header.php
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
<!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
wp_body_open(); ?>
<header class="main-header">
<div class="container">
<div class="logo">
<?php
$choice = carbon_get_theme_option( 'cr_show_logo' );
$logo = carbon_get_theme_option( 'cr_logo' );
if ( $choice && $logo ) {
echo wp_get_attachment_image( $logo, 'logo' );
} else {
bloginfo( 'name' );
} ?>
</div>
<?php
if ( has_nav_menu( 'main-nav' ) ) {
wp_nav_menu( [
'theme_location' => 'main-nav',
'container' => 'nav',
'container_class' => 'main-nav',
'depth' => 1
] );
}
get_search_form();
?>
</div>
</header>