I hope it’s not too late to get in on this discussion. This seems to be the closest I’ve seen to my particular issue. I was hoping that the above code change would be the ticket, but again, no dice.
In my v2.7 sidebar, I am trying to get the child pages to hide unless their parent page is clicked.
Can anyone help me out please?