I have just noticed that my menu items id are not getting generated by wordpress.
I expect it to be something like this
<li id='menu-item-2091' class='menu-item menu-item-209'>
<a href='www.mysite.com/members/<?php echo $user_info->user_login; ?>'>Profile</a></li>
but i get this without the menu item id.
<li class='menu-item menu-item-209'>
<a href='www.mysite.com/members/<?php echo $user_info->user_login; ?>'>Profile</a></li>
This error is occurring in my main menu, but my top menu seems to generate the menu item id properly.
I have looked around the menus area and can’t find any clues why??
Here is a filter that hacks it out
General info
I use my navigation twice (mobile and desktop with different menu ids) and only the second menu is missing the item ids. This makes sense, because it secures that menu-item-ids are only used once.
JQuery Solution
For me the following javascript / jquery solution does the trick. It adds
menu-id-ID
(with ID as the actual menu-item-id) to each menu item.