I found a couple of code snippets for keeping the parent menu item on a subpage, e.g. here, here or here.
However, they all only work when the parent menu item has a submenu. I my case, I created a subpage without including it in the navigation. Is there a way to make the parent menu item active on this page?