title: Show parent of grandchilderen
body: <p>I have a little problem.</p>
  
  <p>I have one parent, 1 child, 1 grand child, 1 great grand child and 1 great great grand child as page structure in wordpress.</p>
  
  <p>The code that i use is this:</p>
  
  <pre><code>function wpb_list_child_pages_popup() { 
  
      global $post; 
  
      if ( is_page() &amp;&amp; $post-&gt;post_parent )
  
      $childpages = wp_list_pages( 'sort_column=menu_order&amp;title_li=&amp;child_of=' . $post-&gt;post_parent . '&amp;echo=0' );
  else
      $childpages = wp_list_pages( 'sort_column=menu_order&amp;title_li=&amp;child_of=' . $post-&gt;ID . '&amp;echo=0' );
  
  if ( $childpages ) {
  
      $string = '&lt;ul id="child-menu"&gt;' . $childpages . '&lt;/ul&gt;';
  }
  
  return $string;
  
  }
  
  add_shortcode('wpb_childpages_popup', 'wpb_list_child_pages_popup');
  </code></pre>
  
  <p>I only see the parent of that current child page or great grand child page.</p>
  
  <p>How can i use this code on time to make sure that de current page shows 2 parents up in the list?</p>