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
- In WordPress, I want to use code to filter out one menu item (page) from displaying when I call wp_nav_menu() function
- Add data-icon input to WordPress custom menu links
- Registering menu with ‘Automatically add new top-level pages to this menu’ selected
- What does a walker menu mean?
- Add a logout menu link [duplicate]
- How to open modal window when clicking a WP menu link?
- How to get current page menu item name instead of full menu item list
- change front end menu depending on user login
- Number of items in a menu
- Mobile menu works on local XAMPP, but not on GoDaddy [closed]
- list pages only from master parent
- WordPress cache a menu with Transient API
- How to display the title for each menu item in a span attribute
- Limit top level menu items on wp_nav_menu
- How do you center the main menu in CSS? [closed]
- Wp menu add page link as custom empty link
- How to change the wordpress navigation bar UL to OL in Twenty_Twelve similer theme
- wp_nav_menu including Skype URL
- Why is my menu not ordered properly?
- How to add class to and childs of sidebar widget – WordPress
- Hook for number of items in Appearance > Menus > CustomPostType > View All [duplicate]
- Programmatically add existing pages and subpages to Appearance Menu
- Appearance Menus Screen – menu item drop down menu not functioning
- Is it possible to add a dynamic link in the main navigation in a child theme
- wp_nav_menu check both hierarchy fail?
- Edit the (automatic) HTML layout of nav menus
- Add custom path to url to specific pages
- How do add a menu with levels within page [closed]
- Hide menu item when users are logged in/out
- How to add scroll IDs to WordPress menu anchors
- Display pictures instead of text in menus
- how to check if given page is active page
- how to set the link in wordpress such that on clicking it doesn’t open another page but go to the bottom of same page
- WordPress Menu – creating a fake link [closed]
- Add div content to my already existing menu
- dot.com/car1 does work, but dot.com/transport/car1 doesn’t work
- code to add an extra selection to the menu editor
- Cannot add home page url to menu with #
- Accidental reverse order of menu items in one menu
- Extend Individual Menu on Page Function to individual Submenue on Page Function?
- Walker for menus
- How to add an tag when a menu item is a dropdown(or has a sub-menu) [duplicate]
- Remove “Next Post” in nav_menu
- Menu not Showing on Mobile or While the page is shrinked
- My Menu Disappears on my Custom Link Homepage on Mobile
- Add A Menu Item To A WP_Nav_Menu Navigation via PHP Function