-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheader.php
51 lines (45 loc) · 1.44 KB
/
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
40
41
42
43
44
45
46
47
48
49
50
51
<!DOCTYPE html>
<html>
<head>
<meta charset="">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<?php wp_head();?>
</head>
<body>
<?php wp_body_open(); ?>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top">
<div class="container">
<span class="navbar-brand">
<?php if( has_custom_logo() ) {
the_custom_logo();
} else { ?>
<li class="menu-text"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?>
<?php } ?>
</span>
<button id="site-navigation" class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="navbar-nav ml-auto">
<?php
if ( has_nav_menu( 'primary' ) ) {
wp_nav_menu(array(
'menu' => 'Main Menu',
'theme_location' => 'primary',
'container_id' => 'cssmenu',
'walker' => new CSS_Menu_Walker()
));
} elseif ( ! has_nav_menu( 'expanded' ) ) {
wp_list_pages(
array(
'match_menu_classes' => true,
'show_sub_menu_icons' => true,
'title_li' => false,
)
);
}
?>
</ul>
</div>
</div>
</nav>