I want to lists the current page’s children with depth 1.
I made this possible by unsing:
<?php global $post; wp_list_pages( array('child_of' => $post->ID, 'depth' => 1) ); ?>
But the problem is that i don’t just want to list the sites, i also want to display a featured image and the excerp of the page.
What wordpress function should i use ?
This is the html structure i want to repeat for each children:
<div class="wrapper p4"> <div class="grid_4 alpha"> <div class="wrapper p2"> <figure class="border fleft"> <img src="url-to-featured-image" alt="" /> </figure> </div> <h6 class="prev-indent-bot"> <a class="link" href="url-to-post">Title</a> </h6> <p class="indent-bot">Excerp of page</p> <a class="button" href="url-to-post">Read more</a> </div> </div>
- The topic ‘Page children with feautured image and text.’ is closed to new replies.