home info scripts guides links contact

Manual Archiving

So you want to make archives in wordpress, eh? It's not hard at all. This tutorial is targeted for people who use an include on their frontpage to display wordpress.

Make a new page

Just make a new page in your ftp called archives.php or whatever you'd like to do. You can put it on your sidebar too or whatnot, but I like to keep it on a separate page so you don't crowd things. Just make it like a regular page just like any other. Now save that page and move on.

Make the archive month

Let's say I want to make an archive page for the month of July 2004. Make a new page and put in the following code:

<? include('http://www.yourdomain.com/wordpress=200407'); ?>


NOTE: remove the space between the 20040 and the 7; that is a wordpress error i somehow could not fix...

Save it as something, I reccomend 200407.php (or the year and month names together) because it makes sense. That page will display all of the posts from July 2004. Here's how it works:

http://www.yourdomain.com/wordpress=200407 is the wordpress page with all of yours posts from July 2004. 2004 represents the year and 07 represents the month, so every single archive URL looks like this:

http://www.yourdomain.com/wordpress=YYYYMM (YYYY= 4 digits of the year and MM= 2 digits of the month)

So october 2005 looks like this: 200510
January 1940 looks like this: 194001

And so on and so forth. By including that page in another page, you'll have your archives in one page that matches your layout. Now go back to archives.php and add the link to the page that you just made (or in my example, 200507.php). Simple.


copyright 2008 Maggie N