The block of code below returns a single post. When including the p
parameter, it returns the the post with the id of 1
.
if( $query->is_main_query() && !is_admin() && is_home() ) {
$query->set( 'p', '1' );
$query->set( 'posts_per_page', '1' );
There is however no pagination for previous or next posts. The objective is for the home page to show the first post however present the users to navigate to newer and/or older posts.
The codex doesn’t appear to offer an option to enable pagination.
Is thre a way to enable this?