I am looking to get a custom WordPress nav output but I’m struggling to understand where to go with it.
At the moment, the default output for WordPress is this:
<ul> <li>Link</li> <li>Link <ul><li>Link</li></ul> </li> </ul>But what I need to output is the following:
<ul> <li>Link</li> <li>Link <ul><div><span /><li>Link</li><span /></div></ul> </li> </ul>Now I know there is the $before and $after in WordPress but unfortunately if you use this it adds it to every link rather than just the child li’s that I want it to add them to.
I understand this would be done with using the custom walker method but to say I’m confused is an understatement! Can anyone point me in the right direction?