Function Reference 'i neredeyse baştan sona taradım ama bir şey bulamadım. Bahsettiğin sayfa hiyerarşisi ile ilgili bir durum herhalde. Eğer öyle ise biraz yüzeysel de olsa şöyle bir öneri var ; functions.php sayfasına
function is_tree($pid) {
global $post;
if(is_page()&&($post->post_parent==$pid||is_page($pid)))
return true;
else
return false;
};