Support » Fixing WordPress » Add li classes to wp_nav_menu items

  • jmillspaysbills

    (@jmillspaysbills)


    Hi there. I’m having an issue w/ my wp_nav_menu that I’m hoping is a somewhat easy fix.

    What I was hoping to do was to achieve a menu that looks similar to this:

    page1 | page2 | page 3 | page 4

    I know i can add a “|” after the item via the “after” argument in my nav include, but that gives me a “|” after the last item. But that’s not really what I want. I’d

    What I figured I could do would be to add a border-right to all list items, then give the last item a class of “last” and a border-right: 0;

    It would be nice to be able to add a class on each item via the WP back end for all items, because it would enable me to do image replacements, etc via CSS techniques. Maybe next WP release? Who Knows.

    Thanks for your help, guys and gals!

Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Add li classes to wp_nav_menu items’ is closed to new replies.