MWDelaney / sage-bootstrap4-navwalker

MIT License
73 stars 34 forks source link

navbar-nav class missing on ul element #4

Closed ChristophAnastasiades closed 5 years ago

ChristophAnastasiades commented 6 years ago

Thank you for this great Navwalker! I just had a problem with the class navbar-nav not being added to the ul element and therefore the Bootstrap styles did not apply to the menu items. I fixed this by manually merging the $primarymenu array with menu_class like so:

{!! wp_nav_menu(array_merge($primarymenu, ['menu_class' => 'navbar-nav'])) !!}

valentinocossar commented 6 years ago

I have the same issue 👍

edit. For me using this with Controller seems not working at all. Sorry, could you help me please? 😔

edit 2. I found the problem, my bad, is not possible to change the name of the function primarymenu in camelCase format. Why this behavior? Thank you!

edit 3. I have to do a better search before posting something here. 😅 I have seen that soberwp/controller convert camelCase functions in snake_case. Sorry! 🙁