I’m looking for an answer to this too.
i googled this
http://www.wpgeek.com/tutorials/how-to-check-if-wordpress-page-have-subpages-or-childrens/
which suggests you could do this for when a page has children
global $post; return (count(get_pages('child_of='.$post->id))>0);
this for checking the page has a parent
global $post; return($post->post_parent != 0);
and then combine when either is true with
global $post; return (count(get_pages('child_of='.$post->id))>0) || ($post->post_parent != 0);
i’d be interested to know if that works
That didn’t work, but I finally got this to do it.
(Replace ‘123’ in the line below with the parent page ID number)
global $post; return (is_page(‘123’) || ($post->post_parent==”123″));
great, glad you’re sorted.
that’s the solution for a specific page or the children of a specific page.