Create a page template with this code between header and footer:
<?php
/**
* Template Name: The Last Post
*
*/
get_header();
//The code begins here
$the_query = new WP_Query( 'posts_per_page=1' );
while ($the_query -> have_posts()) : $the_query -> the_post(); ?>
<a href="<?php the_permalink() ?>"><?php the_title(); ?></a>
<?php the_content();
endwhile;
//The code ends here
get_footer(); ?>
Then create a new page, select this template and save it. Now in Settings > Reading, select the option "static page" and define the page created as "Front page".
Also, create a new white page with the blog name —for example— and save it. In Settings > Reading, define this page as "Posts page". Now we have the last post in the front page and all the posts in a blog page.
But we still need to exclude the last post in the loop, in order to avoid duplicate content. You will probably find the loop in the file index.php
or loop.php
.
Find this line:
if ( have_posts() ) : while ( have_posts() ) : the_post();
And add these lines overriding the last one:
$offset = new WP_Query( 'offset=1' );
if ( have_posts() ) : while ($offset -> have_posts() ) : $offset -> the_post();