I´m developing a single page theme and want to render all pages with their respective templates on a single page. I know I could make a query and write the markup for the respective page, but I prefer separate all templates in files. What I want is to make the loop and load the template-*.php file for each page. Is that possible?
To clarify this a little bit, below follows an example of what I want:
$query = new WP_Query();
$wp_query->query('post_type=page');
while ($wp_query->have_posts()) : $wp_query->the_post();
get_template_part('templates', 'template_slug');
endwhile;
and in the while loop output not only the content, but the content in teh right markup.
Any help is more than appreciated!