/ Published in: PHP

Takes the ID of a page, then displays a list of child pages with thumbnails and page titles. The thumbnail is generated from the 'featured image' of the particular child page.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php //get current page ID $the_id = '14'; 'child_of' => $the_id, 'title_li' => '', 'parent' => $the_id, 'sort_order' => 'DESC', 'sort_column' => 'menu_order' ); $pages = get_pages( $args ); $output = ''; foreach($pages as $value){ $output .= "<li>"; $output .= "<a href='" . $value->post_name . "' >" . $thumb . "</a><br />"; $output .= "<a href='" . $value->post_name . "' >" . $value->post_title . "</a>"; $output .= "</li>"; } echo $output; ?> </ul>
Comments
