You will need to create another page, in admin, if you want the home page and the posts page to be different pages (have different URLs).
Or, if you want to display the posts on the same page as the other page in question, then still keep reading...
If you want to use index.php
to show posts, but not use the Posts Page setting, then you'll need to write a custom query in index.php
.
You can use WP_Query
, or get_posts()
or other methods.
Example using WP_Query
:
$args = array(
'post_type' => 'post'
'posts_per_page' => -1
);
$the_query = new WP_Query( $args );
if ( $the_query->have_posts() ) {
while ( $the_query->have_posts() ) {
$the_query->the_post();
the_title();
the_post_thumbnail();
}
/* Restore original Post Data */
wp_reset_postdata();
} else {
// no posts found
}
If you want to have the posts on a different URL, then it's gonna have to be a separate page. If you don't want it to be 'empty' then put a shortcode in there (to display posts), rather than use the Posts Page setting.
You could create a shortcode and put a WP_Query
in it.