Working on a theatrical events site. The structure requires several separate events areas, each with a top page listing events in the particular area, and corresponding individual events pages underneath the listings page. Since each of the event area pages require a different treatment, I thought this was a good situation for custom post types, using both single-[event] and archive-[event] templates for each area.
I installed Custom Post Types UI to make the custom post types (including matching custom taxonomy) and Advanced Custom Fields to make meta fields. So far so good. The Archive custom post type (full listing of area events) pulls meta from the Single custom post type, and both custom post pages display correctly except for one thing: the main nav menu no longer highlights the active web page on the Archive listing. [Note: there are many posts about how to highlight submenu Single custom posts to match parent; I don’t need that, just need the current Event Area to highlight correctly in main menu nav!]
I realized I had constructed my main nav – which includes the event areas – with wp_nav_menu and register_nav_menus. So the event areas corresponding to Archive custom posts were originally constructed as Pages and the main nav was set up using WP Menu’s drag and drop capability. Wordpress correctly defaults to the archive-[event] custom post template (and ignores the existing Page with same name), and the nav menu is functional in terms of links, but doesn’t highlight the Archive custom post link in the nav. Pages in the main nav work correctly.
When I check output on Event Area, there is a “current_page_parent” class attached to the Blog nav, but no “current-menu-item” elsewhere, which I guess is appropriate for custom posts. I suppose if wp_nav_menu is just for Pages, this makes sense as the top-level archive posts won’t be recognized, but I have no clue how to fix it. I’m will to try hacks, but want to avoid ID-specific ones or jQuery if possible. One thought would be to chuck the archive-[event] template, and use a regular page template for the listing while keeping the true single-[event] custom type post. Any reason faking it that way couldn’t work? Thanks for any advice, hope I'm missing obvious/easy approach.