WordPress.org

Support

Support » Themes and Templates » Last Item Of A WordPress Menu

Last Item Of A WordPress Menu

  • I’ve created a menu in WordPress 3.0.3 and used the following parameter

    ‘after’ => ‘ |’

    to add a pipe after each menu item to separate them. What I would really like to do is eliminate the pipe from the last item in the menu. Is there any way to do this? To affect just the last item in the menu? Any help or guidance would be greatly appreciated. Thank you.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Google for CSS nth child / last child selectors

    Thanks, Root. I was hoping there might be a native WordPress solution. I’m hesitant to use the CSS nth-child since it is STILL not supported by IE. I guess if there’s nothing within WordPress I will go with jQuery, as that will work in IE. Thanks again.

    You can induce IE to behave with the right hack or script. Its a CSS question really not a WP one.

    Not sure how you’ve created the menu, but is it possible to store it in a variable before printing to the screen?

    Thanks for the input everyone. jQuery seems to be the best solution here, so that’s what I’m going to go with.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Last Item Of A WordPress Menu’ is closed to new replies.