[wp-hackers] problem with $post->post_parent

Will Anderson will at itsananderson.com
Mon Mar 29 04:58:03 UTC 2010


Perhaps a silly question, but you've actually set up the page hierarchy
correctly, right?

Also, depending on when this code is running, $post may not have been
populated yet. If you're trying to do this from a plugin you may need to do
some hook foo.

A judiciously placed  print_r of the $post variable should clear up both of
these questions.


More information about the wp-hackers mailing list