Balkhis - Vision For Success

How to add an archive page in wordpress?

As you see, recently with the new design I have added an archives page in Balkhis. I had alot of people asking me the questions which I have already answered in my previous posts, so therefore I thought adding a page like that would help. Plus as I see from a users end on problogger, I like the archive page there. So in this post, I will be sharing how you can add an archive page to your wordpress blog.

First step is to open a new .php file, and name it blogarchive.php. Remember whatever you do, do not name the file archive.php because it will conflict with your database and not show the results correctly.

Second step, you want to do is give this page a template name, so it can have its own style. Copy and paste the codes below, this must be at the very top. Even above your include header codes.

To watch a video how I did it you can refer back to my old post on How to create your own custom wordpress page?

Well once that is done, now you can add the design elements in your archive page. You can add By month, By Category, By Tags basically anything you want in there.

To give you some options check out the list below:

Show archives by month - <?php wp_get_archives(’type=monthly’); ?>

Show archives by categories - <?php wp_list_cats(); ?>

Show archives by tag - <?php wp_tag_cloud(’smallest=8&largest=12&unit=pt&number=30&format=list&order=RAND’); ?>

Show some of the recent posts - <?php get_archives(’postbypost’, ‘17′, ‘custom’, ‘<li>’, ‘</li>’); ?>

Add a Search Bar you have the codes for that.

You can basically add anything that you like. For an example check out Balkhis Archive Page

Now linking to archives is creating duplicate content in the blog, as I mentioned in my post about Duplicate content, so what you need to do is get the most essential plugin for a wordpress blog called All in One SEO Pack and put the settings as I have shown in my post about All in one SEO Plugin.

Hopefully this will help some people who were looking to add an archive page in their wordpress blog.



To stay updated with the blog, please consider subscribing to my full feed RSS. You can also subscribe by Email and have new posts sent directly to your inbox. I hate spam as well, so I promise you that you will not be spammed.
Add to Social Bookmarks:
Add this Article to Digg Add this Article to Stumbleupon Add this Article to Del.icio.us Add this Article to Reddit Add this Article to Newsvine Add this Article to Technorati

RSS feed | Trackback URI

2 Comments »

Comment by Enkay Blog
2008-06-28 15:43:41

Hey, great post about adding an Archive page since it is definitely a big plus for new users to explore your old posts.


 
2008-07-18 07:31:11

[...] Make an Archive Page for your Wordpress. [...]


 
Name (required)
E-mail (required - never shown publicly)
URI
Your Comment (smaller size | larger size)
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> in your comment.
Subscribe to Balkhis via RSS
Subscribe to Balkhis via Email Pimp My Blog
  • Recent Readers