Home Tutorials How to Create An Archives Page

How to Create An Archives Page

Author

Date

Updated on

Category

In another effort to de-clutter the sidebar and begin your initiation for The Organization for the Organized, here’s how to create an archives page for archive links listing by categories and months. First of all, check out the Wpdesigner’s archives page to see what you’ll be adding to your blog.

Second, most free WordPress themes already have an extra page template for an archives page. Look in your theme’s folder for an unused PHP template file. Usually, theme authors name this template archives.php, which is different from your default archive template, archive.php (without the “s”).

Third, you need to know that this tutorial is not the end-all tutorial for creating a custom archives links listing page. The structure of each theme is not always exactly the same as the next theme’s structure. All I can show you is the basics and how I did it.

The Steps:

1. Create a new file and name it archives.php

2. At the top of that file, type:

<?php
/*
Template Name: Archives Page
*/
?>

Without those lines above, you won’t be able to use your new archives template file so be sure that you don’t leave that out.

3. Add the loop, title, category listing, and month listing:

<?php while(have_posts()) : the_post(); ?>

<h2><?php the_title(); ?></h2>

<ul><?php wp_list_cats(’sort_column=name&optioncount=1′) ?></ul>

<ul><?php wp_get_archives(’type=monthly&show_post_count=1′) ?></ul>

<?php endwhile; ?>

4. Tweak the codes above to make it fit in with your current theme. Here’s where different theme structures come into play. I can’t give you my archives template because it might not work with your theme’s structure.

5. Upload it to your theme’s folder.

6. Create a new page and select your newly upload Archives page template for that page.

 

write-page-archives-templat

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Recent posts

5 WordPress Plugins to Increase Your Website Speed

 And if you’re an online entrepreneur, you probably know that making people wait is bad for your eCommerce business too — really bad.I mean,...

How to Show Only Images that the User Has Uploaded in WordPress

When using WordPress with multiple authors, many things need to be taken into consideration. The default permissions system leaves much to be desired, and...

Oxygen Builder Review

Free from all sorts of coding hassles and an abundance of options that cater to the users’ needs, Oxygen 2.0 is probably the best...

Basic Guide to Online Backup

A Basic Guide to Online Backup You may have heard of it, know you need it, but what exactly is it? Online backup is the...

Web Hosting Hub Review

How did it begin? Based in Virginia Beach, Web hosting hub has been on the market since 2001. If it were not for Web Hosting...

Recent comments