-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheader.php
81 lines (58 loc) · 2.43 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Meta -->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Blog Site Template">
<meta name="author" content="https://letiziadimaio.netlify.app/">
<link rel="shortcut icon" href="wp-content/themes/hamlet/assets/images/logo.png">
<?php
wp_head(); // Prints scripts or data in the <head>
?>
</head>
<body>
<!--get_bloginfo('name'); loads the site name dynamically and allows to be edited -->
<header class="header text-center">
<a class="site-title pt-lg-4 mb-0" href="http://hamlet.local/">
<?php echo get_bloginfo('name'); ?></a>
<nav class="navbar navbar-expand-lg navbar-dark" >
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navigation" aria-controls="navigation" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div id="navigation" class="collapse navbar-collapse flex-column" >
<!-- it will output the site logo -->
<?php
if (function_exists('the_custom_logo')) {
$custom_logo_id = get_theme_mod('custom_logo');
$logo = wp_get_attachment_image_src($custom_logo_id);
}
?>
<img class="mb-3 mx-auto logo"
src="<?php echo $logo[0] ?>" alt="logo" >
<!-- it will create dynamic primary menu with styling of <ul> copied from
the HTML template -->
<?php
wp_nav_menu(
array(
'menu'=> 'primary',
'container'=> '',
'theme_location'=>'primary',
'items_wrap'=>'<ul div id= "" class="navbar-nav flex-column text-sm-center text-md-left">
%3$s</ul>'
)
);
?>
<hr>
<?php
dynamic_sidebar('sidebar-1'); // to output sidebar
?>
</div>
</nav>
</header>
<!-- the_title(); in PHP outputs the page title heading dynamically -->
<div class="main-wrapper">
<header class="page-title theme-bg-light text-center gradient py-5">
<h1 class="heading"><?php the_title(); ?></h1>
</header>