So I have a loop that is displaying all pages (not posts) on my home page. I want to modify the loop so that it’ll only display the children of a single parent page (the page id number is 116, just for reference). How should I modify the code below to do this?
<?php query_posts('post_type=page&posts_per_page=-1'); ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<a href="<?php the_permalink() ?>"
rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>">
<div>
<?php echo get_the_post_thumbnail($page->ID, 'thumbnail'); ?>
<div ><?php the_title(); ?>
</div> <!-- headlines-title -->
</div></a>
<?php endwhile; endif; ?>
Also wanted to add that displaying grandchildren is OK, too…
try this
$id is your page id
Changed course and got the results I wanted this way: