{"id":745,"date":"2012-03-06T09:27:08","date_gmt":"2012-03-06T19:27:08","guid":{"rendered":"http:\/\/mymonkeydo.com\/?p=745"},"modified":"2012-03-06T09:27:08","modified_gmt":"2012-03-06T19:27:08","slug":"wp_nav_menu-adding-a-class-to-a-menu-item","status":"publish","type":"post","link":"https:\/\/mymonkeydo.com\/wp_nav_menu-adding-a-class-to-a-menu-item\/","title":{"rendered":"wp_nav_menu adding a class to a menu item"},"content":{"rendered":"
Problem<\/p>\n
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. \u00a0I don’t want the first item to show a border.<\/p>\n
<\/p>\n
Solution<\/p>\n
WordPress is just so easy to use. \u00a0This 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. \u00a0Go to Appearnace->Menus. \u00a0At the top, click on Screen Options and check “CSS Classes”. \u00a0Now you can expand a menu item and add a class in there.<\/p>\n
<\/p>\n