Sometimes you need to display a block of code on a parent page, and then all of it’s child/grandchild pages.

I wrote a little helper function to find out if the page you are on is a child/grandchild of a specific page. You can optionally pass a variable to check if you are on the parent page as well.