[wp-testers] wp_nav_menu item classnames

Jeremy Zilar jeremyz at nytimes.com
Wed May 12 15:10:08 UTC 2010


Any thoughts on adding the page-slug as a classname to the menu-item when a PAGE is used?

Currently it is outputting 
<li class="menu-item menu-item-type-post_type menu-item-object-page"><a href="...">Menu Item</a></li>
for each page added

class="menu-item menu-item-type-post_type menu-item-object-page page-slug"


On May 9, 2010, at 10:16 PM, Jeremy Zilar wrote:

> When using the new *wp_nav_menu*, and selecting existing Pages as your menu
> items,
> has anyone been able to output the post_name (Page slug) as a classname for
> each specific menu item?
> 
> It seems you are able to define the classname when you create a custom link
> for your menu, but it doesn't define a classname when using an existing page
> as a menu item.
> 
> -jeremy
> _______________________________________________
> wp-testers mailing list
> wp-testers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-testers


Jeremy Zilar ✩ Blog Specialist
IM - patiencematters | jeremyz at nytimes.com | @silencematters



More information about the wp-testers mailing list