wp_get_post_parent_id
wp_get_post_parent_id ( $post = null )
Parameters:- (int|WP_Post|null) post Optional. Post ID or post object. Defaults to global $post.
Returns:- (int|false) Post parent ID (which can be 0 if there is no parent), or false if the post does not exist.
Defined at:Change Log: - Introduced in WordPress: 3.1.0
- Deprecated in WordPress: —
Description
Returns the ID of the post's parent.