Tagged: How to Find ID of Top-Most Parent Page

How to Find ID of Top-Most Parent Page?

This will find what the ID is of the top-most parent Page, in a nested child page. For example, this page you are literally looking at is nested under <?php if ($post->post_parent) { $ancestors=get_post_ancestors($post->ID);...