here is Hierarchy
Parent (id=34) Child Child of child-1 Child of child-2 Child of child-3 Child of child-4
I am at child of child, i Just want to show sibblings of child of child if parent is '34', like this
- Child of child-1
- Child of child-2
- Child of child-3
- Child of child-4
I used the below function in function.php, but its not working properly
function is_tree($pid) { // $pid = The ID of the page we're looking for pages underneath
global $post; // load details about this page
if(is_page()&&($post->post_parent==$pid||is_page($pid)))
return true; // we're at the page or at a sub page
else
return false; // we're elsewhere
};
Thanks Furqan Khyraj