Custom Walker Functions/Classes for wp_nav_menu won't work
-
I’m having trouble understanding how to deploy a walker class to a wp_nav_menu and finding an adequate explanation for how one works.
Essentially what I’m doing is building an accessibility driven theme and I want to clean up the markup, in my wp_nav_menu by eliminating the redundant classes and IDs WordPress generates. But I’d still like to have a user add their own classes via the option the backend provides.
And not only that, I’d really like the walker to inject classes for the active page, plus surround the active link with tags, say, as not to rely on CSS alone.
Roger Johansson posted an article doing the exact thing I’d really like to do with wp_list_pages, which I got working, but it won’t translate for me to wp_nav_menu.
Any help anyone could provide would be greatly appreciated. Thanks.
- The topic ‘Custom Walker Functions/Classes for wp_nav_menu won't work’ is closed to new replies.