-
Notifications
You must be signed in to change notification settings - Fork 0
/
header.php
executable file
·48 lines (41 loc) · 1.82 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
<!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 ====================-->
<header class="header" id="header">
<nav class="nav container">
<a href="<?php echo esc_url(home_url()); ?>" class="nav__logo">
<i class="ri-leaf-line nav__logo-icon"></i> <?php bloginfo( 'title' ); ?>
</a>
<div class="nav__menu" id="nav-menu">
<?php
$plantex_main_menu = wp_nav_menu(array(
'theme_location' => 'primary-menu',
'menu_id' => 'primary-menu',
'menu_class' => 'nav__list',
'menu_container' => 'ul',
'echo' => false
));
$plantex_main_menu = str_replace('menu-item', 'menu-item nav__item', $plantex_main_menu);
$plantex_main_menu = str_replace('current-menu-item', 'current-menu-item active-link', $plantex_main_menu);
echo $plantex_main_menu;
?>
<div class="nav__close" id="nav-close">
<i class="ri-close-line"></i>
</div>
</div>
<div class="nav__btns">
<!-- Theme change button -->
<i class="ri-moon-line change-theme" id="theme-button"></i>
<div class="nav__toggle" id="nav-toggle">
<i class="ri-menu-line"></i>
</div>
</div>
</nav>
</header>