-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmenus-mobile.php
65 lines (49 loc) · 1.96 KB
/
menus-mobile.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
<!-- ------------------------------------------------------------------------ -->
<?php if( get_field('main_menu_mode','option') == 'primary' ): ?>
<!-- The WordPress Menu goes here -->
<?php wp_nav_menu(
array(
'theme_location' => 'primary',
'container_class' => 'collapse navbar-collapse',
'container_id' => 'navbarNavDropdown',
'menu_class' => 'navbar-nav',
'fallback_cb' => '',
'menu_id' => '',
'walker' => new WP_Bootstrap_Navwalker(),
)
); ?>
<?php endif; ?>
<!-- ------------------------------------------------------------------------ -->
<?php if( get_field('main_menu_mode','option') == 'content' ): ?>
<div id="navbarNavDropdown" class="collapse navbar-collapse">
<ul class="navbar-nav">
<?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' ): ?>
<!-- The WordPress Menu goes here -->
<?php wp_nav_menu(
array(
'theme_location' => 'global',
'container_class' => 'collapse navbar-collapse',
'container_id' => 'navbarNavDropdown',
'menu_class' => 'navbar-nav',
'fallback_cb' => '',
'menu_id' => '',
'walker' => new WP_Bootstrap_Navwalker(),
)
); ?>
<?php endif; ?>
<!-- ------------------------------------------------------------------------ -->