I have been googling for the past 2 hours and haven't been able to figure this out, mainly because I am missing the right terminology, in other words, I don't know what I want in "wordpress words".

What I want is a custom ¿page? that will display the header (get_header()) and below it it will be a list of the last 5 published posts and it should go like this:

Title of the post

Text of the post

Times five for the last five.

Underneath it there should be a link to "Older posts" that links to the next five (older) posts.

I'm told this is an archive but the documentation on Archive doesn't help to accomplish this, neither do the tutorials I've found.

What is the easiest way to do this?

1 Answer 1


I found the actual answer in a stackoverflow question.

Quoted from the answer:

<?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$args = array( 'post_type' => 'post', 'posts_per_page' => 10, 'paged' => $paged );
$wp_query = new WP_Query($args);
while ( have_posts() ) : the_post(); ?>
    <h2><?php the_title() ?></h2>
<?php endwhile; ?>

<!-- then the pagination links -->
<?php next_posts_link( '&larr; Older posts' ); ?>
<?php previous_posts_link( 'Newer posts &rarr;' ); ?>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.