You want to look at using template tag, query_posts(). Make sure you look at the Resource section, in that article also.
To get the ‘5 prior posts’ use the offset parameter.
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.
Did you look at several of the links on the Resource section of that article?
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 🙂