Unsure how to add attributes to already-built menu walker
-
First time wordpress theme builder! I initially built my site on Foundation’s framework and then tweaked it to install it onto WordPress.
In order to make the top bar menu work, I utilized awshout’s WordPress Menu & Menu Walker to dynamically generate the menu. It works like a charm
I have never built a walker, and this is my first time really diving into the backend of WordPress, but I’m hitting a roadblock.
What I would like to do is add to the < li > elements tabindex, roles, and titles. Example:
- Parent/top level links= tabindex=’0′ + role=”menuitem” + aria-haspopup = “true” + custom titles ‘About Menu’ ‘Support Menu’ ect.
- Children links = tabindex=’-1′ + role=”menuitem”
The problem is even after hours of playing I still have no idea WHERE to implement these items on this walker, or even how. My WP installation is local atm for dev, so I cannot share my copy of the WIP.
The WordPress menu & Walker I have installed.
How the Top Bar looks in plain HTML through Foundation.
- The topic ‘Unsure how to add attributes to already-built menu walker’ is closed to new replies.