WordPress Loop Through Particular Pages

Perhaps something like this

$thepages = array (21,22,23);
foreach ($thepages as $thepage) {
  $page_data = get_page( $thepage );
  echo "<h3>$page_date->post_title</h3>";
  echo apply_filters('the_content', $page_data->post_content);
  // spray out other page content
 }

See more here

Leave a Comment