get_post_ancestors ? how does it work?
-
Hi, I want to show the parent page of a page in the sidebar. I tried the following, but it simply shows shows what data type is.
global $post; $parents = get_post_ancestors( $post->ID ); echo $parents;
output is:
Array
What is the correct usage of this?
Thank you!
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘get_post_ancestors ? how does it work?’ is closed to new replies.