$page->isDescendantOf($parent)

Checks if the page is a descendant of the given page

  • $parent (Page | string)
    A page URI or page object.
  • return (boolean)

Example

<?php if($page->isDescendantOf('some-page')): ?>
This page is a descendant of the given page.
<?php endif ?>

Is something missing or incorrect? Edit this page on Github…