How to list pages using featured image and title?

Discussion in 'WordPress' started by Carl29, May 26, 2011.

  1. #1
    Hi,
    I need some help on this :
    I want to list some pages displaying the featured image and the title (both must be a link to the permalink)
    I could show the featured image on the green bordered div but for a parent page :(

    But what I need is to have that effect of the red div
    Here's the code
    <!-- Begin pages -->
    <div id="pages" style="border:2px solid green">
    <?php $pages = get_pages(array('child_of' => 1006)); ?> 
    <ul>
        <?php foreach ($pages as $page): ?>
            <li>
    			<h2><?php echo $page->post_title; ?></h2>
                <?php echo get_the_post_thumbnail($page->ID, 'full'); ?>
                
            </li>
        <?php endforeach; ?>
    </ul>
    </div>
    <!-- / pages -->
    
    
    <!-- All pages -->
    <div id="all-pages" style="border:2px solid red; margin-top: 30px;">
    <ul>
      <?php $pages = wp_list_pages('sort_column=post_title&title_li=&include=471,453,1248,459,458,,469,457,463,465,473,475,494,477,479,481,487,489,491'); ?>
    </ul>
    </div>
    <!-- / all pages -->
    HTML:
    any help would be really apreciated
    Thanks

    website is @ fotografiasdeangola(dot)com/1/benguela/
     
    Carl29, May 26, 2011 IP