Wordpress - show specific page on main index instead of latest

There are 3 latest pages displaying on my WP. Here's the code.


I want to put 3 specific pages that I want on the main index page. How do I tweak it?


If you are using a custom query you can specify page ids. From the Codex;

$query = new WP_Query( array( 'post_type' => 'page', 'post__in' => array( 2, 5, 12, 14, 20 ) ) );

To find your page ids you hover over the link for the each individual page in the Pages screen of the backend and you'll see the page id in the url

EDIT - OK, based on your comment you would change it to the following (let's say your page ids are 2, 5 and 12);

    <?php $homepage_query = new WP_Query( array( 'post_type' => 'page', 'post__in' => array( 2, 5, 12 ) ) );
        while ($homepage_query->have_posts()) : $homepage_query->the_post(); ?>

            <div class="main_post"> 
                    etc etc

    <?php endwhile; ?>

Need Your Help

Silverlight 4.0 PDF Viewer

silverlight pdf silverlight-4.0 stream viewer

Any free control to view PDF for Silverlight?

Why can't I install any packages with GHC 7.8.4 on Raspberry Pi?

linux haskell raspberry-pi

According to this post there is finally a debian package for a version of GHC that supports template haskell and ghci.