Check nav menu target URL for ‘/pressroom/’, then check if it’s a post. If it fits, add custom class to that menu item.
<?php
function my_add_posts_page_ancestor_class( $classes, $item ) {
if( false !== strpos($item->url, '/pressroom/')
&& is_single($item->ID)
&& !is_page($item->ID) ) {
$classes[] = 'my-ancestor-class';
}
return $classes;
}
add_filter('nav_menu_css_class', 'my_add_posts_page_ancestor_class', 10, 2);
The code is untested and can be improved. It’s a direction to think about.
Update
See what I’ve found: Add a class to wp_nav_menu() items with URLs included in the current URL