php - Display Wordpress child pages with TEMPLATE on parent page -
i`m building custom theme 1 page.
i want display child page`s on parent page template of child page has display
the code im using:
<?php $mypages = get_pages( array( 'child_of' => $post->id, 'sort_column' => 'post_date', 'sort_order' => 'desc' ) ); foreach( $mypages $page ) { $content = $page->post_content; if ( ! $content ) continue; $content = apply_filters( 'the_content', $content ); ?> <div class="entry"><?php echo $content; ?></div> <?php } ?> the problem here html of child template not displaying.
what can display template , content of child pages?
Comments
Post a Comment