PHP code to get current parent and all child pages?
-
I am trying to echo a list of links to the current parent and child pages. So, regardless if I’m in a top level page or a sub level page, I want to get the current Top and all Child pages and output them as links.
I am using the Exec-PHP plugin and was thinking of doing this in a Text Widget.
Is there a clean way to get all the current parent’s children? Something like
<?php get_page_children( $page_id=5, $pages )?>only gets the children of a particular parent. I would like to get the parent+children regardless where you are within those pages.
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
The topic ‘PHP code to get current parent and all child pages?’ is closed to new replies.