Displaying Specific Child Contents on Parent Page
-
Through searching I have found this code here…
<?php $child_pages = $wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_parent = ".$post->ID." AND post_type = 'page' ORDER BY menu_order", 'OBJECT'); ?> <?php if ( $child_pages ) : foreach ( $child_pages as $pageChild ) : setup_postdata( $pageChild ); ?> <?php the_content(); ?> <?php endforeach; endif; ?>
Now what I am looking for is to display specific child pages and not all of them. I am using this as a CMS so that the admin can edit a child page and have the content on the parent page update.
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘Displaying Specific Child Contents on Parent Page’ is closed to new replies.