check if current page is child or grandchild of a page
-
hi there, is there a simple way to check if current page is a child or grandchild of a specific page and do somenthing?
I have a hierarchy like:
PAGE
subpage
subpage2
subpage3
subsubpage
subsubpage2
subpage4and I’d like to have sth like:
if (current page is child or grandchild of PAGE) {
do sth
}so that I could display a submenu for PAGE, all subpages and subsubpages
any help would be appreciated, been looking for a solution on forums and google and found nothing ??
basically: if current page is descendant of X then do something
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘check if current page is child or grandchild of a page’ is closed to new replies.