ah. such a shame. thank for letting me know. Perhaps it will get me to delve into it and have a go myself.
Thanks @alwaysblank yup will do. have been meaning too for ages. Just dont get the opportunity.
ah. such a shame. thank for letting me know. Perhaps it will get me to delve into it and have a go myself.
Thanks @alwaysblank yup will do. have been meaning too for ages. Just dont get the opportunity.
so i was fiddling about trying to work out how to get bootsrap nav working with soil and found this:
I actually commented on that post but must have missed it somehow. Anyways i used that custom nav walker and bootsrap nav works with clean menu links
Iām wondering if this is the right place to ask this, but the active class is not being added to any menu items that are linked to a custom post type. Any clue why that is?
@MWDelaney Thanks for this ā Works great! What is the best way to make the parent-level menu items as active links without worrying about this being over written during an upgrade to your script? We found this: https://medium.com/@oscarmwana/make-parent-link-clickable-in-bootstrap-wordpress-navigation-walker-61213063a1a0 - But it looks like this got overwritten at some point when one of our developers cloned the project.
Thanks in advance!
Hi, @Daniel. Truly the best way to do this would be to fork the project and maintain that functionality yourself. Since top-level linking is not supported by Bootstrap, itās not a priority in this project, and is likely to break (as youāve found) when changes are made.
@MWDelaney Thank you sir!
@AmirFarid have you resolved?
Is there a way to use bootstrap 4 nawalkers and soil?
Hi there,
Thank you again for this! I canāt seem to get this to work out of the box. I have tried the controller way and adding namespace to the top as well, but to no avail. Any help would be appreciated.
Fatal error : Uncaught Error: Class āApp\Controllers\wp_bootstrap4_navwalkerā not found in /www/sites/sage/wwwroot/wp-content/themes/mysage/app/Controllers/App.php:39
Thank you in advance,
Josh
The info in this thread is a little out of date. Be sure to check the documentation at the repository here:
It looks like you need to change your walker
from
...
'walker' => new wp_bootstrap4_navwalker()
...
to
...
'walker' => new \App\wp_bootstrap4_navwalker()
...
Thank you!!! This worked. Apologies.
Is there a way to use bootstrap 4 nawalkers and soil?
@MWDelaney , has there been any additional thought toward this, or is there another method to do this? I would be grateful.
Iāve been trying to figure this out for a week to work with Soil, but no luck⦠Rookie
Soilās navwalker and this one are alternative tools. Theyāre not meant to work together and I donāt plan to add they as a feature at this time.
Thank you for the reply, I really do appreciate your knowledgeā¦
Can you recommend a way to still use Soil with the nice links, but not have a lengthy class āmenu-item menu-item-type-post_type menu-item-object-page nav-item nav-item-18ā utilizing this method?
Any help would be greatly appreciated ā I have about 30+ links total and could definitely appreciate less bloat.
Hey @boothwise - you probably need to create your own custom nav walker that combines the elements you want from each. Spending some time looking at the source of Michaelās BS nav walker and the soil nav walker will help you understand how they work and should give you all the insight you need.
Does this still work with bootstrap 5?
This is how I ended up doing it : https://thewpgeek.com/add-a-responsive-menu-in-sage/ I would be interested in anything I should change in the tutorial (especially if something is not best practice)