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

active to current-post-ancestor and current_page_parent? #7

Closed crftwrk closed 3 years ago

crftwrk commented 3 years ago

Hello Alex,

thank you very much for this awesome nav-walker.

Is it possible to add .active class to following parent items?

  1. current-post-ancestor (highlight category link in navbar if a post in this category is viewed)
  2. current_page_parent (highlight shop link if product is viewed)

And I do not see a license here. Can you add a license that we can use this nav-walker safely?

Thank you and best regards

Basti

AlexWebLab commented 3 years ago

Hi Basti, I've added MIT License. I'll look into your request soon. Feel free to make a pull request in case you are faster than me! ;)

crftwrk commented 3 years ago

Hi Alex,

thank you for the license.

I'm not clever enough to touch your code. I did a workaround with JavaScript to set active class to parent item. But I think it's better to code that in your nav-walker. It's not important, just a "nice-to-have".

Thank you and best regards

Basti