current-menu-item on selected anchor link
-
Hi!
I have successfully added the content from multiple subpages into the parent page, with each subpage title displaying as a named anchor, and I am scrolling through the page using anchor links in my wp navigation menu.
The issue I am having is that the current-menu-item doesn’t work, therefore I can’t use the menu to highlight which ‘topic’ (subpage) has been selected.
I have tried using both http:://mydomain.com/page.html#anchorName, as well as just #anchorName in the url field in wp menus. The first option resulted in ALL nav links having the class ‘current-menu-item’ applied to them. The second option resulted in NONE of them having it.
I would greatly greatly appreciate any advice anyone can give me on this.
Thank you in advance!!!!
- The topic ‘current-menu-item on selected anchor link’ is closed to new replies.