WordPress.org

Ready to get started?Download WordPress

Forums

List child pages with thumbnails (5 posts)

  1. cprocious
    Member
    Posted 5 years ago #

    I would like to automatically generate a list of child pages under a parent page, using both the title of the child page, and a thumbnail image.

    I found a widget that will list the pages - text only.

    Is there a way to show thumbnails also?

    http://artstudiosecrets.com/demonstrations/

    Thank you so much for any help.
    Cindy

  2. MichaelH
    Member
    Posted 5 years ago #

    Look at using get_pages() along with get_children().

  3. byandreasdotcom
    Member
    Posted 5 years ago #

    Did you figure this out?

    I would like to create a page that lists subpages like this:
    http://www.nathanlippy.com/

  4. wlindley
    Member
    Posted 4 years ago #

  5. nlaffan
    Member
    Posted 4 years ago #

    Better still, just toss this in your parent template.

    Only the thumbnails of your child pages show up, so long as you create a custom field entitled image-thumb in that (child) page with the image path it should work
    .cheers.

    <div class="maincontent">
                   <?php the_ID(); ?>
                   <?php $parent = $post->ID; ?>
    <?php
    query_posts('posts_per_page=5&post_type=page&post_parent='.$parent);
     while (have_posts()) : the_post();
    ?>
    
        <?php $image_thumb = get_post_meta($post->ID, 'image-thumb', true); ?>
    	<img src="<?php echo $image_thumb; ?>" alt="Image" />
    
    <?php endwhile; ?>
    </div>

Topic Closed

This topic has been closed to new replies.

About this Topic