Highlight another nav item
The page_css_class filter lets you modify the classes each menu item gets. Here we check if we are currently viewing a singular envira post type and the menu item slug is gallery. In that case we add a class to the array of default classes passed to the function. function wpd_page_css_class( $css_class, $page ){ if( … Read more