Get the ID of the direct parent page

I’m assuming that you’re asking how to do it with code? (Doing it in backend is pretty easy – just try to edit parent page and see the ID in URL).

So how to check post parent in code? It’s also very easy – direct parent is stored in post_parent property. If post has no parent, it will be 0.

So all you have to do is:

global $post;
$direct_parent = $post->post_parent;