I have the following code (created very kindly by alchemyth in response to a question I posted on the WordPress.org forum here) that I hope to use to display lots of pages on a single page:
<?php
$args = array(
'post_type' => 'page',
'post__in' => array( 2, 5, 35, 67 ) //list of page_ids
);
$page_query = new WP_Query( $args );
if( $page_query->have_posts() ) :
echo '<div class="pages-on-page">';
//print any general title or any header here//
while( $page_query->have_posts() ) : $page_query->the_post();
echo '<div class="page-on-page" id="page_id-' . $post->ID . '">';
//print any output you want per page//
echo '</div>';
endwhile;
echo '</div>';
else:
//optional text here is no pages found//
endif;
wp_reset_postdata();
?>
As a newby though, I am unsure where to put it to make it work! I would be very grateful if someone could help me with this.