navbar justify-content-start #315
Answered
by
crftwrk
balrogmedia
asked this question in
Q&A
-
Beta Was this translation helpful? Give feedback.
Answered by
crftwrk
Nov 21, 2022
Replies: 1 comment 1 reply
-
Hello, take a look to the nav-walker in https://github.com/bootscore/bootscore/blob/main/header.php line <!-- Bootstrap 5 Nav Walker Main Menu -->
<?php
wp_nav_menu(array(
'theme_location' => 'main-menu',
'container' => false,
'menu_class' => '',
'fallback_cb' => '__return_false',
'items_wrap' => '<ul id="bootscore-navbar" class="navbar-nav ms-auto %2$s">%3$s</ul>',
'depth' => 2,
'walker' => new bootstrap_5_wp_nav_menu_walker()
));
?> Navbar has class Your nav-walker should look like this: <!-- Bootstrap 5 Nav Walker Main Menu -->
<?php
wp_nav_menu(array(
'theme_location' => 'main-menu',
'container' => false,
'menu_class' => '',
'fallback_cb' => '__return_false',
'items_wrap' => '<ul id="bootscore-navbar" class="navbar-nav w-100 justify-content-evenly %2$s">%3$s</ul>',
'depth' => 2,
'walker' => new bootstrap_5_wp_nav_menu_walker()
));
?> Solved? |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
balrogmedia
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
take a look to the nav-walker in https://github.com/bootscore/bootscore/blob/main/header.php line
66
.Navbar has class
ms-auto
which pushes content to the end. Remove classms-auto
and navbar will have flex-start by default. In your case, replacems-auto
withw-100 justify-content-evenly
classes.Your nav-walker should look like this:
<!-- B…