This is regarding the Compact Archives plugin, by Rob Marsh.

There are a few extra steps if you’d like to place the compact archives inside a WordPress page, instead of the sidebar.

<ul><?php compact_archive(); ?></ul> can’t be pasted onto a page within WP admin, because it is a php code.

So here’s what you can do.

What It’ll Look Like

If you view the webhostmonkeys archives, you’ll see this at the top.

compact archives on page

I like that it looks neat, heh.

1. Download + Activate Plugin

Download Compact Archives, and activate it (under the Plugins tab in WordPress admin panel).

2. archives.php

In the WP admin panel, go to Presentation » Theme Editor. Open archives.php.

If your files are not writable, then open archives.php manually on Notepad or something similar.

PS: Don’t mix up archive.php and archives.php (if you have two!). archives.php (with the s) is usually the template default for an archives page.

3. Configuring archives.php

Add this to the top of the archives.php file.

<?php/*

Template Name: archives

*/

?>

Then, add the following code where you want Compact Archives to appear.

<div id="content" class="archive"><h2>Archive – All Entries</h2>

<ul class=”postspermonth”>

<?php if (function_exists(’compact_archive’))

compact_archive(’block’); ?>

</ul>

</div>

Screenshot:

archives

4. Create “Archives” Page

In WP admin, go to Write » Write Page.

Create a new page titled “archives” (or whatever you’d like, but logically it’ll be plain ol’ boring “archives”). Leave the page content blank.

5. Apply Template to Page

When you’re on Write Page, look to right sidebar options.

Apply the Archives Page (the file you’re calling out is archives.php).

apply archives template

Now when you view your archives page, Compact Archives should appear on it.

Related Post