Using the following snippet, you will be able to get Parent Id for WordPress.

Snippet Source/Credit: Snipplr