Take a look at this link, which will help you add the class for custom post types: https://gist.github.com/gerbenvandijk/5253921
Related Posts:
- Dynamically exclude menu items from wp_nav_menu
- Add custom menu item using wp_nav_menu_items filter
- Custom search filter causes menu and query_posts problems
- Unregister Nav Menu from Child-Theme
- Allow html tags in WordPress Custom Menus Description Field
- Using filters to change href of nav menu page link
- How to apply a class to the second word in menu list item?
- WordPress nav_menu_link_attributes Not Working
- Is it possible to add a filter for the output of nav-menu items in admin?
- if role is logged in then do something
- Filter menu item to add classes/attributes?
- Edit html for menu items in default frontend menu
- Set Item Order with wp_nav_menu_{$menu->slug}_items
- When at / ( or “home”) my menu doesn’t get a current-menu-item class
- How to add parent element’s title to nav menu’s child?
- Why is ‘nav_menu_item_args’ filter’s $item argument empty?
- Add class to active element and its parent in nav menu
- display only the wp_nav_menu, which has the current-menu-item
- Removing strip_tags not working on nav_menu_description
- Third level navigation class
- How to add #navbar to all page links?
- add span to top level links of a wordpress menu called “main”
- Debugging – trying to add search box to menus
- wp_list_pages() but only show children on the branch you are on
- From a page, is it possible to find entry’s “menu_item_parent”?
- add_filter on menu items to add a menu item
- how to disable default menu classes
- Insert other menus as submenus of a main menu
- list category posts under its item in menu
- Prevent menu from loading in a page template [duplicate]
- Insert a div before the wp_nav_menu
- How to change menu structure?
- Secondary Navigation Menudisappeared When using wp_nav_menu_items
- remove specific classes from menu items
- wp_nav_menu action/filter help
- add_filter for where statment issue
- Add a counter beside menu item label
- Add custom link on the fly to nav menu
- menu-item class missing on wordpress menu
- Filter to hook into menu items and add a custom attribute
- if role is logged in then do something
- Possible to append class to nav menu added to widget area?
- Modifying Woocommerce menu based on tags and categories
- Why does WordPress convert absolute URLs to relative URLs for menu items?
- Menu location switcher – example code fails
- Add Featured Image and Title to wp_nav_menu items
- Show thumbnail to category items in wp_nav_menu(), how?
- Add Class to Custom Menu Widget ul
- Avoid changing menu query with suppress_filters => false
- Removing menu item doesn’t get removed on edit post
- Add Protocol to Custom Menus
- How to modify menu text in callback function of ‘walker_nav_menu_start_el’ hook
- Why is WordPress stripping anchor links from mneu item URLs?
- Add button and title on submenu WordPress
- New post notification in wp_nav_menu
- How to use a WordPress’ existing admin icon?
- One site, 2 distinct sections: two different top nav menus?
- Can you have different menus and theme on a per-page basis?
- Display link with current user’s username in it in Custom Menu
- Add class to menu ul with active child
- Check what “type” a menu item is
- Add within the output of
- Add CSS to head depending on nav menu walker
- WP MU: Using pages from main site in other sites’ menus
- Get Menu Name inside walker
- How to add ul and li classes to nav in wordpress
- Where to implement custom walker class?
- Responsive menu gone on wordpress Responsive theme
- register_nav_menus() won’t register menus
- How can I add text to a single nav menu item?
- How to add attribute in menu code
- In the Admin Dashboard, can I choose which sections to display?
- How to change the color of a menu item [closed]
- Walker menu not displaying at all
- wp_nav_menu not displaying the right way
- add 3rd party link (with script) to menu item
- Hide an item from a menu to some users
- Locking in navigation labels before changing title?
- How to Add support for sub-menu item description in wordpress?
- wp_nav_menu_items for one menu
- Customise the custom menu widget
- I can’t add more pages to menu – menu delete pages
- Confused about the correct functioning on WordPress Menus
- Admin Menu Hack (Left side in Dashboard)
- How to manipulate attributes of url-less dropdown item in a the custom wordpress menu?
- How do I remove this menu bar?
- nav-menu-template and columns in sub menu
- Custom link with checkbox that adds additional word to checked menu items
- menu not showing on mobile view
- Is it possible to have submenu outside of menu element? I dont want submenu to be a child of menu
- Bootstrap Nav Walker Sub Menu Image
- What are some of your favorite methods for creating an accessible menu?
- How to get all the menu listed in Menus Created inside the Apperance Menu?
- Add parent link to its submenu
- Can’t change link for navigation item
- Loading wordpress menu in an external server
- Need direction on a seemingly complex menu walker for automatically inserting a parent link li in it’s submenu ul
- Prevent Menu Shortcode From Formatting
- individual images as navigation design TwentyTen
- add dynamic ID for wp_nav_menu after and before