check if current page is a child of a specified top level page
I won’t give a solution to your actual issue but I will show you how you can verify if current page is child of a specific top level page. If you need to check the current page has specific Parent page the you can do like this: <?php $currentPage = get_the_id(); $pageAncestors = get_post_ancestors($currentPage); $hasParent … Read more