WordPress.org

Ready to get started?Download WordPress

Forums

Is there a wp_nav_menu filter of any kind? (6 posts)

  1. gutterboy333
    Member
    Posted 1 year ago #

    I am trying to add a spacer <li> tag between each parent <li> tag but am having trouble figuring out how to do that.

    What filters does wp_nav_menu pass through or how would I go about doing this?

  2. potentweb
    Member
    Posted 1 year ago #

    http://codex.wordpress.org/Function_Reference/wp_nav_menu

    Pretty thourough on what is available. Instead of using a "spacer" just use CSS and class to target what you need.

  3. gutterboy333
    Member
    Posted 1 year ago #

    I've already read that page but nothing jumped out. I've also tried using the CSS pseudo :before element and browser support aside, it has it's issues. So I was looking for something that was bit more rock solid.

  4. potentweb
    Member
    Posted 1 year ago #

    What is the link to your site?

  5. gutterboy333
    Member
    Posted 1 year ago #

    It's not live right now, I'm just working on it on my local server. I can upload a static copy if need be.

  6. potentweb
    Member
    Posted 1 year ago #

    Unless I see the live site, can't really help more. The only thing I can tell you is that when your using the menu, wordpress adds bunch of classes and stuff to the generated menu. Use it to target the li item that you are trying to modify. If that is not an option, then jQuery is your only other option since it can do much more math and calculations than CSS alone can do.

Topic Closed

This topic has been closed to new replies.

About this Topic