post Posted By: BioTecK

Having an archives page for your WordPress blog is something very important. In an archive page you can archive links listing by categories, months, year and pages.
Most free WordPress themes already have an extra page template for an archive page. Just look in your theme’s folder for an php file called archives.php. This is different then your default archive template which is called archive.php (without the “s”).

But if you have a theme which doesn’t have an archive page, you can make one your own very easy when you follow this steps. I take my own archive page as an example.

  1. Make a copy of your index.php and call it archives.php. This is just to preserve your theme structure!
  2. Open the file and type this at the top of the Archives.php
  3. Now remove the original loop code in the index.php.
  4. Add the category listing by inserting this code:<h2>Archives by Categorie:</h2>
    <ul><?php list_cats(0, '', 'name', 'ASC', '/', true, 0, 1); ?></ul>
  5. Add the month listing by inserting this code:<h2>Archives by Month:</h2>
    <ul><?php wp_get_archives('type=monthly'); ?></ul>
  6. Add the page listing by inserting this code:<h2>Archives by Pages:</h2>
    <ul><?php wp_list_pages('title_li'); ?></ul>
  7. Save the archives.php file, upload it to your theme’s folder (wp-content/themes/themename/).
  8. To use your archives page you have to create a new page and select your newly upload Archives page template for that page!


| post Category: WordPress | post |


There are 2 comment(s) for this article so far ;)

#1
Pixel Shoppe wrote on Thursday 15 May 2008 - 22:36

Hi, thanks for dropping by and commenting. It is always appreciated. Cool post, I had a hard time figuring out how to make an archive. :oops:
Pixel Shoppes last blog post..Vacation Rentals

#2
BioTecK wrote on Friday 16 May 2008 - 18:28

Hello Pizel Shoppe,
Glad that I could help you!! Making an archives page is very easy as you can see! :D

You can leave a response, or trackback from your own site.

Write Your Comment

Comment Guidelines: Basic XHTML is allowed. You can use these tags:
<a href="" title=""> <abbr title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>.
All line breaks and paragraphs will be generated automatically.

You should have a name, right? 
Your email address, I promised I won't tell it to anyone. 
If you have a web site or blog, you can type the URL right here. 
This is where you type your comments. 
Remember my information for the next time I visit.

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word