Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I want to add | (vertical lines) between the page links in the nav menu. What's the easiest way to do this?

share|improve this question
    
This would be a CSS question. You can use left/right borders to accomplish this. –  Brian Fegter Sep 27 '11 at 0:05
add comment

1 Answer

up vote 1 down vote accepted

The wp_nav_menu function supports multiple styling parameters, http://codex.wordpress.org/Function_Reference/wp_nav_menu

For instance you can add a $menu_id and then style the CSS for each <li> along the lines of border-right:1px solid; . Another option is to just add a "|" for the $link_after parameter, but you should probably use the ascii HTML entity value for it which is &#124;.

share|improve this answer
    
Thanks, I want it to be a "|" because I like the way the font I'm using for the nav displays it. However, if I add a $menu_id I get a "|" at the end of the menu, plus it also become part of the link so changes color on rollover. Any ideas? –  fxfuture Sep 27 '11 at 4:28
    
Use an background image if you want a specific look. –  Wyck Sep 27 '11 at 5:27
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.