using;

$args = array( 'menu' => 'mainmenu', 'container' => 'ul', 'menu_class' => 'span-10 clearfix', 'after'=>"https://wordpress.stackexchange.com/");
wp_nav_menu($args);

which gives me;
london/munich/artists/fairs & events/publications/news/contact/

but using the args (or similar) can i remove the / from contact?

any help welcome!

4 Answers
4

Here is a completely different approach to the problem. Since the slashes may be considered to be presentational, they should not go into the HTML. Users without CSS just get to see a regular list.

You could then use CSS to restyle the list and add the slashes in between.

#nav li { display:inline; }
#nav li:before { content:"https://wordpress.stackexchange.com/"; }
#nav li:first-child:before { content:''; }

Check it out here.

Note: this will not work in IE7 and older. IE7 does support :first-child but :before only works from IE8.

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *