You can use the below query to get content from specific pages by id or page slug
// WP_Query arguments
$args = array(
'page_id' => '12,14,78,89',//replace the page ids
//'pagename' => 'aboutus, contact', //or use page slugs
'post_type' => array( 'page' ),
'post_status' => array( 'publish' ),
'posts_per_page' => '10',
);
// The Query
$query = new WP_Query( $args );
// The Loop
if ( $query->have_posts() ) {
while ( $query->have_posts() ) {
$query->the_post();
echo '<h3>';
echo $the_title;
echo '</h3>';
echo $the_content;
}
} else {
// no posts found
}
// Restore original Post Data
wp_reset_postdata();