wp_nav_menu not setting current_menu_item?
-
If I go to the Menus and update the Main Menu to include an item called News:
URL: /news/
Navigation Label: News
Title Attribute: newsthe News item shows up in my menu. Great. But when I then navigate to /news/, WordPress does not add a current_menu_item class to the
<li>
.Nor does it give the
<li>
menu item an id or a name of “news” – instead it’s called something unhelpful like “menu-item-899”.Why doesn’t WordPress add the current_menu_item class? Surely it has all the information it needs to do this?
And how can I style the
<li>
item to show that it is the current item? I really don’t want to have to use jquery to look at the page name – messy.
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘wp_nav_menu not setting current_menu_item?’ is closed to new replies.