Pulling out and Displaying Old Archived Posts

Sometimes you might want to display old or archived posts on your home page as featured posts or just to highlight some popular ones that you had written months or years ago. An excellent and simple way to do that is using the Archivist WordPress Plugin.

Though this plugin hasn’t got an admin interface under the settings tab, you can easily edit the archivist.php file in a text editor and change its parameters.

You can change the values for:

1. Number of old posts you want to display.
2. Whether the posts are selected randomly or not.
3. How long you want to display the posts for. This is set for 1 day by default, but you can alter its time period to suit yourself.
4. You can change after how many recent posts this plugin should display the old archived posts.
5. If you want to include posts from a certain category you can give its category ID or a list of IDs by separating them with commas.
6. You can even set the time range to include older than or newer than specific days for old archived posts to show up on the home page.
7. Then you can set limit of posts per page to include or exclude the pulled in old archived posts.
8. Lastly you can set the title to differentiate between recent and current posts.

A few pointers about using this WordPress Plugin.

1. When you try to set the limit of posts per page to keep the number of posts intact on including the old posts, you might lose continuity. Though this could be because of the theme you are using. So you might have to set this parameter to show old posts in addition to the recent posts making the total number of posts on the first page greater than 10.

2. If you are experimenting with this plugin while installing, you might not notice change in posts after altering some parameters. You will have to reduce the time for displaying the posts to say around 60 seconds and refresh the page to see the changes. After you have successfully configured all the parameters you can change back the time to display the posts to the original 24*60*60 or whatever time you want to set.

3. If you leave the category ID blank for showing old posts from all categories, any Pages that you have created might also be shown instead of just the old Posts as these come under the ‘Uncategorized’ category ID. To over come this you have to specify all the categories from which you want to display old posts from excluding the ‘Uncategorized’ ID from the list.

4. The title of the old archived posts will include the HTML code when you hover the mouse pointer over the titles. If you set something like this:

<small>Blast from the Past: </small><br />%title

For making the hovering over the title to display the heading properly you will have to edit your index.php file that displays your home page and change a line as follows:
Go to line containing:

title=”<?php the_title(); ?>”

and change it to:

title=”<?php echo strip_tags($post->post_title); ?>”

This will strip all the HTML tags you use. You can even use this to change the style of your old archived posts to highlight them differently.

This plugin has been tested to work on WordPress 2.6.5 and 2.7. Great plugin to display old archived posts.