1037 posts
  • Affiliate Level 6
  • Author Level 11
  • Collector Level 4
  • Top Monthly Author
+9 more

So I have been playing with Wordpress 3 and trying to create a navigation menu with the new menu manager feature. I’m struggling a little with accomplishing what I want using the wp_nav_menu() function.

Basically, I’m trying to get it to list out the menu with no container div and no ul tag. The reason I’m trying to do this is because I generally like to apply some sort of custom styling to the first button in the menu.

So, I’m trying to figure out how to configure the arguments in the function so my markup can look something like this:

    <li class="first"><a href="" title="">HOME</a></li>
    <?php wp_nav_menu($args); ?> 

I’ve been trying to follow the different parameters here, but there’s not a whole lot of information yet:


I figured out that if I set the container argument to blank like “container=”, it will remove the default wrapping div, but haven’t been able to figure out how to strip away the ul tag (similar to how with wp_list_pages(), you can use “title_li=”) . Any ideas on how to do this?

Also, if there’s a better way to add special styling to that first menu item and I’m going about this all wrong, please chime in! :-)