Syntax Q: Trying to display Child Pages + Featured Image in page order (1 post)

  1. sharpfield
    Posted 3 years ago #

    So I've got a page on my website where I've managed to display all the Featured Images from the page's Child Pages, using this code:

    <?php $pages = get_pages(array('child_of' => 19)); ?>
        		<?php foreach ($pages as $page): ?>
             			<?php echo get_the_post_thumbnail($page->ID, 'thumbnail'); ?>
    		<?php endforeach; ?>

    Now I'd like to know how I can display these Child Pages in Page Order, as well as that I'd like the Featured Images to be linked to the Child Pages (i.e. you're able to click on them to go to the Child Page).

    Any help would be amazing, I've had a few attempts but I'm pretty dusty with my WordPress / PHP syntax!

Topic Closed

This topic has been closed to new replies.

About this Topic