Support » Fixing WordPress » Nav Menu – Walker or Code to add class based on cat/tag/page id
4 years, 1 month ago
I have the menu set up, but, due to user requirements I have a custom routine to add categories and tags as sub menu items dynamically to specific menu items.
now I need to walk the menu and add a class termid-## to the li where ## is the category/tag/page id of the link.
and that is where I am stuck. I don’t quite understand the walker class or how it functions, not even sure if a walker can do this or if there is another way.