I am looking to display archives pages as a normal posts page...
So, a posts page with a secondary navigation showing:
LATEST POSTS / LAST MONTH / LAST YEAR / OLDER
On each of those pages, I would like to display a summary of each post just like the standard latest news page. When you click through you get to the full post.
For each of menu items I have created seperate page templates such as archives_month.php
, Then in the template instead of using <?php wp_get_archives
I have been using <?php query_posts
and adding some time params but unfortunately I have no found the best / correct way to get these yet.
I have one script that works:
<?php if (have_posts()) : ?>
<?php $current_month = date('m');?>
<?php $current_year = date('Y');?>
<?php $current_year = $current_year - 24;?>
<?php query_posts("cat=5&year=$current_year&monthnum=$current_month");?>
For the LAST MONTH page. But I now cannot use this for LAST YEAR and OLDER posts.
Can anyone help me? I've looked into a number of different ways to do it but on some blogs it's not clear and most people just retrieve a list of archives rather than displaying the posts.
Thanks in advance. Mel