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!

Answers


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>

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 -->

Need Your Help

Using a persistent database in Django unittests

python database django django-models wordnet

I have a large readonly Wordnet PostgreSQL database that I'd like to use from Django unittests. Specifically, I have an app, called "wordnet", that wraps this Wordnet database. Unfortunately, the d...

Using Intent in an Android application to show another activity

android android-intent android-activity

In my Android application, I have two activity classes. I have a button on the first one and I want to show the second when it is clicked, but I get an error. Here are the classes: