• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
wpdesigner-logo

WPDesigner

WordPress Themes, Blog Design, and Web Development

  • News
  • Tutorials
    • Theme Development
    • WordPress Tips
  • Resources
  • Reviews
    • Hosting Reviews
  • Collections
    • Plugin Collections
    • Theme Collections
  • Contests
  • WWMD
  • Our Themes
  • Login
WPDesigner » Tutorials

How to Create An Archives Page

Last Updated on February 16, 2018 by Jazib Zaman

write-page-archives-templat

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

About Jazib Zaman

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

  • LinkedIn
  • Pinterest
  • RSS
  • Twitter

Recent Posts

  • What is SEO and How Does it Work?
  • 40+ Solutions to Supercharge Your WordPress Website
  • Create Your Own Website or Outsource to a Web Studio?
  • 4 Things You Will Need for a Successful Career in the Tech Industry
  • Finding the Best Host for Your WordPress Powered Website

Copyright © 2021 · All Rights Reserved · A Project of TechAbout LLC.
All of our themes are 100% GPL compatible.

  • About
  • Write for us
  • Archives
  • Contributions
  • Privacy Policy
  • Feedback
  • Terms & Conditions