Tag Archives: hierarchy

Snippet: Add parent page slug to body_class

Add following snippet to “functions.php” Snippet

content-tree

Snippet: Check for hierarchy descendant

Add following snippet to “functions.php” Snippet Result A conditional function to check if the current page is a descendant of the ID given to it. Useful for determining if a page is a grandchild, great-grandchild or father down the hierarchy tree.