I'm developing a Wordpress theme and I've registered a new menu location (called primary menu) and am using a menu with it. In my menu, I have a page called "tier-2 page" under a page called "tier-1 page".
I want to get the ID of the parent page ("tier-1 page") while on the child page ("tier-2 page"). I've tried
get_post_ancestors($post->ID) and all of them return 0.
At this point, I have no idea why I can't retrieve the ID of the parent page. Any ideas?