post_parent returns 0 even when post is revised to give a parent
|Reported by:||petethebloke||Owned by:|
I've added <?php echo $post->post_parent; ?> to a page and it shows 0 when on homepage (as expected). It shows 14 when on a subpage of 14, but on a different sub-page of 14 it shows 0. It seems it's getting the original parent before the page was revised to be a subpage of 14.