Create and Customize an Archives Page

This document is deprecated! The information on this page refers to a Thesis version that is now obsolete. Please visit the Thesis Docs for current documentation.

An Archives Page displays a summary of all the available archives on your site (i.e., a list of all your monthly archives by month, a list of all your category archives by category, and so on).

Create the Archives Page ∞

  1. Go to Pages > Add New.
  2. Give a title to the Page (such as Archives).
  3. Under Attributes > Template, choose “Archive” from the drop down selector.
  4. Publish the Page.

Customize the Archives Page ∞

By default, the Thesis Archives Page will display two types of archives lists: the first by month, and the second by category. If you wish to customize this page, you will need to replace the default display, using a custom function and the thesis_hook_archives_template hook.

Here is an example of a custom function (based on the Thesis default code for this template) which adds post counts next to each of the archives in each list:

function my_archives_template() {
?>
	<h3 class="top"><?php _e('By Month:', 'thesis'); ?></h3>
		<ul>
			<?php wp_get_archives('type=monthly&show_post_count=1'); ?>
		</ul>
	<h3><?php _e('By Category:', 'thesis'); ?></h3>
		<ul>
			<?php wp_list_categories('title_li=0&show_count=1'); ?>
		</ul>
<?php
}

remove_action('thesis_hook_archives_template', 'thesis_archives_template');
add_action('thesis_hook_archives_template', 'my_archives_template');