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 </div> <?php endwhile; ?>