WordPress.org

Ready to get started?Download WordPress

Forums

wp_list_pages not showing all subpages at grandchild level (1 post)

  1. tbennett04
    Member
    Posted 3 years ago #

    On a sub-sub-page I'm trying to display all it's siblings and grandparent's children. I'm double checking to make sure I've got the post ID of the grandparent and then calling an array to make sure everything is completely specified. Everything that is supposed to show up does EXCEPT the siblings and its parent. What the heck am I missing??
    Here is the code I'm using:

    $parent = $post->post_parent;
    $get_grandparent = get_post($parent)
    $grandparent = $get_grandparent->post_parent;
    $topdog = array(
    'depth' => 0,
    'child_of' => $grandparent
    );
    wp_list_pages($topdog);

Topic Closed

This topic has been closed to new replies.

About this Topic