256 posts
  • Has sold $5,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Has been part of the Envato Community for over 3 years
  • Sells items exclusively on Envato Market
+1 more
evaske says

Hi,

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?

907 posts
  • Has been part of the Envato Community for over 6 years
  • Has sold $1,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
Marvidude says

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by