WordPress.org

Ready to get started?Download WordPress

Forums

parent page showing child pages' as thumbnails (2 posts)

  1. inescamposalves
    Member
    Posted 2 years ago #

    Hi,
    I'm trying to create a parent page displaying only thumbnails of child pages.
    So far I have managed to create a list of pages but I can't figure out how to:
    1. add thumbnails to pages without displaying it on the actual page
    2. Go from displaying a list to displaying only thumbnails (no titles or excerpts, just images)

    Here is what I have on my parent page template:

    <blockquote><div id="entry">
    <?php the_content(); ?>

    <?php
    $children = wp_list_pages('title_li=&child_of='.$post->ID.'&echo=0');
    if ($children) { ?>
    <ul class="pagelist">
    <?php echo $children; ?>

    <?php } ?>

    </div></blockquote>

    I have searched on the forums but since I'm new to wp I would really appreciate some extra help.

    Thanks!

  2. JarretC
    Member
    Posted 2 years ago #

    You need to look into setting up Post Thumbnails for your theme (http://codex.wordpress.org/Post_Thumbnails) and check the Featured Image check box from the Screen Options dropdown for your pages. Once that is enabled you can set your featured image: Set featured image -> Upload image -> Click Use as featured image in popup window -> Save all changes and close the popup

    Once you have that enabled you'll have to setup a custom WP_Query (http://codex.wordpress.org/Class_Reference/WP_Query) and then use the_post_thumbnail (http://codex.wordpress.org/Function_Reference/the_post_thumbnail) within your template file to display the image.

Topic Closed

This topic has been closed to new replies.

About this Topic