How would I display a list of my child pages using featured images on a its parent page as well as its other siblings child page?

For example, if my parent page is called 'Music', I'll have my main content with child pages thumbnails at the bottom.

I'd like to have thumbnails with permalinks to other child pages from within the parent Music page displayed across all of the child music pages.

Is this possible?


  • There are a number of related questions to the right under "Related". Do none of those help? – s_ha_dum Jun 11 '13 at 21:34
  • Some of these are useful, but i'm still in need to post the thumbnails with permalinks of child pages, when even on other child pages from the same parent page? – David Jun 11 '13 at 21:41

Use get_ancestors to get the page parent, then get the children of that parent.

$ancestors = array();
$ancestors = get_ancestors($post->ID,'page');
$parent = (!empty($ancestors)) ? array_pop($ancestors) : $post->ID;
if (!empty($parent)) {
  $kids = new WP_Query(
      'post_type' => 'page',
      'ignore_sticky_posts' => true
  if ($kids->have_posts()) {
    while ($kids->have_posts()) {
      echo '<a href="'.get_permalink().'" title="'.get_the_title().'">'.get_the_post_thumbnail().'</a>';
  • how do I link the thumbnails to their permalink pages? – David Jun 11 '13 at 22:28
  • @David : see the edit – s_ha_dum Jun 11 '13 at 22:37

This is the best solution worked so far for me, which is combination of multiple solutions i found online,

With this code you can display Sub Page Featured Image and Title with anchor link.

Also this work for Sub and Child page too.

<!--Child Page Thumbnails Start-->
  $subs = new WP_Query( 
      'post_parent' => $post->ID, 
      'post_type' => 'page', 
      'meta_key' => '_thumbnail_id' 
if( $subs->have_posts() ) : 
  while( $subs->have_posts() ) : 
    echo '<article class="span_8 col clr-margin products-thumb"> <a href="'.get_permalink().'" title="'.get_the_title().'">'.get_the_post_thumbnail().'</a>'.'<br/><h2><a href="'.get_permalink().'">'.get_the_title().'</a></h2></article>';
wp_reset_postdata(); ?>
<!--Child Page Thumbnails End-->

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.