forked from webspec-design/wordpress-elixir
-
Notifications
You must be signed in to change notification settings - Fork 0
/
header.php
40 lines (40 loc) · 1.6 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
<!doctype html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<?php wp_head(); ?>
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="header">
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<a class="navbar-brand" href="<?php echo home_url(); ?>">
<?php if(file_exists(IMAGES . '/logo.png')): ?>
<img alt="<?php echo get_bloginfo('name'); ?>" src="<?php echo IMAGES; ?>/logo.png">
<?php else:
echo get_bloginfo('name');
endif; ?>
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbar-nav-1" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<?php wp_nav_menu(array(
'theme_location'=>'navigation-menu',
'depth' => 2,
'container' => 'div',
'container_class' => 'collapse navbar-collapse',
'container_id' => 'navbar-nav-1',
'menu_class' => 'navbar-nav mr-auto',
'fallback_cb' => 'wp_bootstrap_navwalker::fallback',
'walker' => new bs4Navwalker()
)); ?>
</div>
</nav>
</div>