AlexWebLab / bootstrap-5-wordpress-navbar-walker

Bootstrap 5 WordPress navbar walker menu.
https://github.com/AlexWebLab/bootstrap-5-wordpress-navbar-walker
MIT License
250 stars 107 forks source link

Adding custom classes to the Anchor elements #9

Closed nite1984 closed 2 years ago

nite1984 commented 3 years ago

In my use case I need to be able to add custom classes to the anchor elements created by wp_nav_menu . To do so, I have a hook filter that should be called on nav_menu_link_attributes. The problem is that bootstrap_5_wp_nav_menu_walker appears to never call nav_menu_link_attributes, so this does not work. Can this be added ?

I have another similar filter for nav_menu_css_class (used to add classes to the li elements), which works fine (I guess because nav_menu_css_class is actually called in bootstrap_5_wp_nav_menu_walker).

Thanks

facundomontiel commented 3 years ago

Hey! Just checking if there are any updates to this thread, as I am currently having the same issue. Did you manage to fix it somehow?

nite1984 commented 3 years ago

Hey! Just checking if there are any updates to this thread, as I am currently having the same issue. Did you manage to fix it somehow?

No, but in my case I "solved" the problem by assigning the classes to the < li > elements (using the nav_menu_css_class filter). If you need help setting that up, let me know and I'll put it here.

AlexWebLab commented 3 years ago

Hello guys, sorry I’m little busy these days. I’ll try to look into this and add this functionality inside a couple of weeks. Thanks for your patience. Feel free to make a pull request in case any of you is faster than me.

imranhwebdev commented 3 years ago

Multi Dropdown Not Working, Please Fix This Issue

24Degrees commented 3 years ago

It’s not designed to be multilevel!!

Michaël Martens 24degrees

Op 25 aug. 2021 om 06:40 heeft Md Imran Hossain @.***> het volgende geschreven:

 Multi Dropdown Not Working, Please Fix This Issue

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

crftwrk commented 3 years ago

Bootstrap has only 2 level depth. But you can code your own https://bootstrap-menu.com