Add class active to static menu

What you’ll need to do is use get_ancestors(). Pass get_ancestors() your current page ID, and then search the resulting array for the menu item ID. If the menu item ID is in the array, set the class to active.