$theme_pages, 'sort_column' => 'menu_order' ) ); echo ''; $query = new WP_Query( array( 'post_type' => 'page', 'post__in' => $theme_pages, 'orderby' => 'menu_order', 'order' => 'ASC' ) ); if ( $query->have_posts() ) { while ( $query->have_posts() ) : $query->the_post(); global $post; $page_id = get_the_ID(); $page_template = str_replace('.php','',get_post_meta( $page_id, '_wp_page_template', 1 )); echo '
'; echo ''; echo ($page_template=='template-slideshow'?'':'
'); if ($page_template == 'default') { //get_template_part('templates/page', 'header'); the_content(); } else { get_template_part($page_template); } echo ($page_template=='template-slideshow'?'':'
'); echo '
'; endwhile; } ?>