Hi, all -
I'm having an odd problem while trying to work with sub-sub-Pages. For a given Page, I want to list its parent, the page itself, and any sub-Pages. It seems to be working for top-level Pages and first-level sub-Pages, but the wp_list_pages function doesn't seem to work for second-level sub-Pages. I've put telltales in my l_sidebar code, and the IDs all seem to be correct, but the wp_list_pages function just isn't picking them up.
Any ideas what I'm doing wrong? Here's a code snippet:
$thispage = $wp_query->post;
if ($thispage->post_parent!=0)
{
wp_list_pages("title_li=Parent:&include=".$thispage->post_parent);
echo "this page's parent ID is " . $thispage->post_parent . $newline;
}
wp_list_pages("title_li=ThisPage:&include=".$thispage->ID);
echo "this page's ID is " . $thispage->ID . $newline;
wp_list_pages("title_li=Children:&sort_column=menu_order&depth=2&child_of=".$thispage->ID); ?>
Or, if you prefer to look at the real thing, it can be found at:
http://www.scopedin.com/wordpress
Thanks for any insight...