WordPress: Display multiple static pages on one page (Single Page website)

what is the best practice to turn a single-page website into a wordpress site? How should I render the different pages in ONE file (front-page.php, e.g.), appearing one after another?
Each section on the page should be a different wordpress (static) page. One template that renders other templates?

Thank you in advance!

Related posts

Leave a Reply

2 comments

  1. in the index.php file make each section a post query of the page name.

    <section>
    <?php query_posts('pagename=youpagename'); if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
    <div>the coontent etc.</div>
    <?php endwhile; ?>
    </section>
    
  2. Here is some code I used a while back. Might help you out.
    Make sure when you test it the ID’s match pages in the backend.

    <section id="usp" class="clearfix">
    
        <?php
    
            $pages = get_pages('include=11,212,15,17&sort_column=menu_order');
    
            $count = 0;
    
            foreach($pages as $page)
    
            {
    
            $content = $page->post_excerpt;
    
        ?>
    
        <div class="column">
    
            <div class="inner">
    
                <h2><a href="<?php echo get_page_link($page->ID) ?>"><?php echo $page->post_title ?></a></h2>
    
                <div class="usp-excerpt"><p><?php echo $content ?></p></div>
    
                <a href="<?php echo get_page_link($page->ID) ?>" title="<?php echo $page->post_title ?>" class="usp-readmore">More&hellip;</a>
    
            </div> <!-- end inner -->
    
        </div> <!-- end column -->
    
        <?php } ?>
    
    </section> <!-- end usp -->