Display Excerpts with Thumbnails for Child Pages of Current Page
-
I am trying to find a nice snippet to display the excerpts of the current pages children.
I found this bit of code but am not sure how to also incorporate the featured image (thumbnail) into it.
<?php
$pageChildren = get_pages(‘sort_column=menu_order&hierarchical=0&child_of=’.$post->ID);
if ( $pageChildren ) {
foreach ( $pageChildren as $pageChild ) {
echo ‘<p>And the title is: ‘. $pageChild->post_title.'</p>’;
if ($pageChild->post_excerpt){
echo ‘<p>And the excerpt is: ‘.$pageChild->post_excerpt.'</p>’;
}
}
}
?>Any suggestions would be great!
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Display Excerpts with Thumbnails for Child Pages of Current Page’ is closed to new replies.