WordPress.org

Ready to get started?Download WordPress

Forums

Last Item Of A WordPress Menu (6 posts)

  1. backpages
    Member
    Posted 3 years ago #

    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.

  2. Root
    Member
    Posted 3 years ago #

    Google for CSS nth child / last child selectors

  3. backpages
    Member
    Posted 3 years ago #

    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.

  4. Root
    Member
    Posted 3 years ago #

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

  5. elfin
    Moderator
    Posted 3 years ago #

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

  6. backpages
    Member
    Posted 3 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags