wp_nav_menu() mark current item ancestor of custom post type
I do the following, it can be lengthy if you have many post types, feel free to edit it however: /** Edit Nav Menu calsses **/ function custom_wp_nav_classes($classes, $item){ global $post; $page_blog = get_option(‘page_for_posts’); if(is_tax(‘my_taxonomy_name_here’) || is_singular(‘my_post_type_name_here’)){ /** Remove Active Class from Blog **/ if($item->object_id == $page_blog) $classes = array_filter($classes, “remove_parent”); /** Page ID of … Read more