Loop through Custom Post Type, and then show children within each iteration
Placing the following code within the WP_Query loop works: <?php $parent_page_id = ( ‘0’ != $post->post_parent ? $post->post_parent : $post->ID ); $mypages = get_pages( array( ‘child_of’ => $parent_page_id, ‘post_type’ => ‘programs’ ) ); foreach( $mypages as $page ) { $content = $page->post_content; if ( ! $content ) // Check for empty page continue; $content = … Read more