wp_nav_menu adding a class to a menu item


I have a menu which uses wp_nav_menu and I need to add a class to the first item because my menu items have a left border on them.  I don’t want the first item to show a border.



WordPress is just so easy to use.  This may not have been in previous versions, but as of 3.3.1 at least there is a way to add a class to each menu item through the interface.  Go to Appearnace->Menus.  At the top, click on Screen Options and check “CSS Classes”.  Now you can expand a menu item and add a class in there.


Thanks to: http://www.sandboxdev.com/2010/09/23/howto-add-custom-classes-to-individual-items-wp_nav_menu/

Tagged with:

Leave a Reply

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