-
Notifications
You must be signed in to change notification settings - Fork 0
/
menus.php
123 lines (87 loc) · 4.43 KB
/
menus.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<!-- ------------------------------------------------------------------------ -->
<?php if( get_field('main_menu_mode','option') == 'primary' && (get_field('main_menu_style','option') == 'standard' || get_field('main_menu_style','option') == 'independent' || get_field('main_menu_style','option') == 'minimal') ) : ?>
<?php wp_nav_menu(
array(
'theme_location' => 'primary',
'container_class' => 'menu-container d-flex',
'menu_class' => 'primary_menu nav justify-content-between',
'menu_id' => '',
'walker' => new WP_Bootstrap_Navwalker(),
)
); ?>
<?php endif; ?>
<!-- ------------------------------------------------------------------------ -->
<?php if( get_field('main_menu_mode','option') == 'content' && (get_field('main_menu_style','option') == 'standard' || get_field('main_menu_style','option') == 'independent' || get_field('main_menu_style','option') == 'minimal') ): ?>
<div class="menu-container">
<ul class="nav justify-content-center primary-menu">
<?php if( have_rows('content_sections') ): ?>
<?php while ( have_rows('content_sections') ) : the_row(); ?>
<?php if ( get_sub_field('section_slug') ) : ?>
<li class="nav-item">
<a class="nav-link menu-link" href="#section-<?php the_sub_field('section_slug'); ?>">
<?php the_sub_field('section_link_title'); ?>
</a>
</li>
<?php endif; ?>
<?php endwhile; ?>
<?php endif; ?>
</ul>
</div>
<?php endif; ?>
<!-- ------------------------------------------------------------------------ -->
<?php if( get_field('main_menu_mode','option') == 'global' && (get_field('main_menu_style','option') == 'standard' || get_field('main_menu_style','option') == 'independent' || get_field('main_menu_style','option') == 'minimal' || get_field('main_menu_style','option') == 'minimal-logo' ) ): ?>
<?php wp_nav_menu(
array(
'theme_location' => 'global',
'container_class' => 'menu-container',
'menu_class' => 'primary_menu nav justify-content-center',
'menu_id' => '',
'walker' => new WP_Bootstrap_Navwalker(),
)
); ?>
<?php endif; ?>
<!-- ------------------------------------------------------------------------ -->
<?php if( get_field('main_menu_mode','option') == 'primary' && get_field('main_menu_style','option') == 'collapsed'): ?>
<a href class="navbar-light menu-toggle" data-target="#sidebar" data-toggle="collapse">
<i class="fa fa-navicon"></i>
</a>
<div id="sidebar" class="col-2 collapse bg-inverse fixed-top pt-5 h-100 text-center">
<div class="mb-5">
<?php include("logo.php"); ?>
</div>
<?php wp_nav_menu(
array(
'theme_location' => 'primary',
'container_id' => 'sidebar',
'menu_class' => 'nav flex-column',
'menu_id' => '',
'walker' => new WP_Bootstrap_Navwalker(),
)
); ?>
</div>
<?php endif; ?>
<!-- ------------------------------------------------------------------------ -->
<?php if( get_field('main_menu_mode','option') == 'content' && get_field('main_menu_style','option') == 'collapsed' ): ?>
<div class="menu-container">
<a href="#sidebar" class="navbar-light side-bar-toggle" data-target="#sidebar" data-toggle="collapse" aria-expanded="false" aria-controls="sidebar">
<i class="fa fa-navicon"></i>
</a>
<div class="col-2 collapse bg-inverse fixed-top pt-5 h-100" id="sidebar">
<div class="mb-5">
<?php include("logo.php"); ?>
</div>
<ul class="nav flex-column">
<?php if( have_rows('content_sections') ): ?>
<?php while ( have_rows('content_sections') ) : the_row(); ?>
<?php if ( get_sub_field('section_slug') ) : ?>
<li class="nav-item text-center">
<a class="nav-link menu-link text-white" href="#section-<?php the_sub_field('section_slug'); ?>"><?php the_sub_field('section_link_title'); ?></a>
</li>
<?php endif; ?>
<?php endwhile; ?>
<?php endif; ?>
</ul>
</div>
</div>
<?php endif; ?>
<!-- ------------------------------------------------------------------------ -->