get_post_ancestors


get_post_ancestors ( $post )

Parameters:
  • (int|WP_Post) post Post ID or post object.
Returns:
  • (int[]) Array of ancestor IDs or empty array if there are none.
Defined at:

Description

Retrieves the IDs of the ancestors of a post.

Related Functions

_get_post_ancestors, get_ancestors, get_post_custom, get_post_class, get_post_custom_keys

Top Google Results

User discussions

wpseek mobile