archives.php
Description: An optional Archives Index page which displays a list of links to archive pages.
This template includes the following templates:
Template Code
<?php
/*
Template Name: Archives
*/
?>
<?php get_header(); ?>
<div id="content" class="widecolumn">
<?php include (TEMPLATEPATH . '/searchform.php'); ?>
<h2>Archives by Month:</h2>
<ul>
<?php wp_get_archives('type=monthly'); ?>
</ul>
<h2>Archives by Subject:</h2>
<ul>
<?php wp_list_categories(); ?>
</ul>
</div>
<?php get_footer(); ?>
This template includes the following tags:
get_footer()is an include tag which includes the filefooter.php.get_header()is an include tag which includes the fileheader.php.wp_get_archives()wp_list_categories()
HTML Skeleton
[HEADER.PHP] <div id="content" class="widecolumn"> [SEARCHFORM.PHP] <h2>Archives by Month:</h2> <ul> <li>[MONTH], [YEAR]</li> </ul> <h2>Archives by Subject:</h2> <ul> <li class="categories">Categories <ul> <li class="cat-item cat-item-[#]">[CATEGORY]</li> </ul> </li> </ul> </div> [FOOTER.PHP]
Related CSS Styles
Resources
- Creating an Archive Index (WordPress Codex)