Title: 5 previous posts
Last modified: August 19, 2016

---

# 5 previous posts

 *  [minute44](https://wordpress.org/support/users/minute44/)
 * (@minute44)
 * [18 years, 4 months ago](https://wordpress.org/support/topic/5-previous-posts/)
 * Hi, On my home page I would like to display the most recent post in full and 
   then have a list of the 5 posts prior to that.
 * [Matt Brett](http://mattbrett.com/) Has done something similar to what I’d like
   with his Previous Entries section.
 * I want to eventually achieve something that slick but for the time being a list
   of post titles and dates will be fine.
 * How do I do this?
 * Cheers.

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [18 years, 4 months ago](https://wordpress.org/support/topic/5-previous-posts/#post-678641)
 * You want to look at using [template tag](http://codex.wordpress.org/Template_Tags),
   [query_posts()](http://codex.wordpress.org/Template_Tags/query_posts). Make sure
   you look at the Resource section, in that article also.
 * To get the ‘5 prior posts’ use the **offset** parameter.
 *  Thread Starter [minute44](https://wordpress.org/support/users/minute44/)
 * (@minute44)
 * [18 years, 4 months ago](https://wordpress.org/support/topic/5-previous-posts/#post-678644)
 * yeah.. ok.
 * Has anyone done this so I can look at what you’ve done? Reading pages and pages
   of instructions tends not to teach me anything. I need an exaple to pull apart
   and break so I can learn it that way.
 * Anyone.
 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [18 years, 4 months ago](https://wordpress.org/support/topic/5-previous-posts/#post-678670)
 * Did you look at several of the links on the Resource section of that article?
 *  [bohimt](https://wordpress.org/support/users/bohimt/)
 * (@bohimt)
 * [17 years, 4 months ago](https://wordpress.org/support/topic/5-previous-posts/#post-679157)
 * To anyone who views this. Hope this helps.
 * 1] This will go on your index.php in your theme folder, most likely anyways.
 * The php before you start the WP loop:
    `<?php query_posts("cat=1&year=$current_year&
   monthnum=$current_month&order=DESC&showposts=10"); ?>`
 * Change the values as you please. This will display the 10 most recent post in
   category 1 for the current month & year in descending order. So most recent will
   be at the top.
 * 2] Then you need to throw in the WP loop:
    `<?php while (have_posts()) : the_post();?
   >`
 * 3] Then you need to tell WP how to display the information:
    `<a href="<?php 
   the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a>`
 * This will list all 10 most recent posts each with a permalink to their respective
   posts.
 * 4] Close the loop:
    `<?php endwhile; ?>`
 * Thats it. Hope that helps anyone 🙂

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘5 previous posts’ is closed to new replies.

## Tags

 * [previous posts](https://wordpress.org/support/topic-tag/previous-posts/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 3 participants
 * Last reply from: [bohimt](https://wordpress.org/support/users/bohimt/)
 * Last activity: [17 years, 4 months ago](https://wordpress.org/support/topic/5-previous-posts/#post-679157)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
