• Hi,

    I was writing a page where I needed the grandchildren of a page to act differently to the child page of the same family. The menu I was creating from get_pages needed to show either children from a child page or siblings on a grandchild page, anyway that’s by the by.

    I eventually came across $post->ancestors which helped me fix my problem.

    The question I have is when I print_r $post I don’t get the ancestors sub array listed. Are there any other hidden little treats on the global $post that I’m living without? Where can I see a full list?

    Cheers – lee.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘The global post var’ is closed to new replies.