Hey, in the side bar of my children posts I want to have a link that takes the visitor back to the parent page. This is easy on child pages with one parent as I can simply insert:
<?php if($post->post_parent=="1025"){?>
However as soon as I get child pages more than one level deep such as:
Fish > Tropical Fish > Amazon Fish
Then the above code no longer works because post_parent id is now Tropical Fish rather than Fish.