Create a Archive Page in WordPress

Posted on January 28, 2008
Filed Under WordPress Customization, WordPress Coding |

If you have blogged for a while, the monthly archive list could be quite long. It may take big real estate in the side bar. The alternative is to create a separate page just for archives.

First, create a template page file, archivepage.php, with header info like:

<?php
/*
Template Name: ArchivePage
*/
?>

In the content division, add the following code:

<p><b>Archives</b></p>
<p>
<?php get_calendar(); ?>
</p>
<p>
<?php wp_get_archives(’type=monthly’); ?>
</p>

Then, create a WP page, select “ArchivePage” as the template.  That’s it.  This page will display calender and monthly archive list.

Comments

Leave a Reply




*
To prove you're a person (not a spam script), type the security word shown in the picture.
Anti-Spam Image